Skip to content

clear button get exception when EditText is empty #5

Description

@minooei

the problem is in here
back.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View arg0) {

            String lock = unlock.getText().toString();
            lock = lock.substring(0, lock.length() - 1);
            unlock.setText(lock);

        }
    });

it will fix with try catch ;)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions