Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Erase input EditText value . #3

Open
arsojosw opened this issue Nov 27, 2017 · 0 comments
Open

Cannot Erase input EditText value . #3

arsojosw opened this issue Nov 27, 2017 · 0 comments

Comments

@arsojosw
Copy link

final SwipeDismissDialog swipeDismissDialog = new SwipeDismissDialog.Builder(this)
.setLayoutResId(R.layout.dialog_add_user)
.build()
.show();
final EditText usernameEditText = (EditText) swipeDismissDialog.findViewById(R.id.et_username);
swipeDismissDialog.setOnKeyListener(new View.OnKeyListener() {
@OverRide
public boolean onKey(View v, int keyCode, KeyEvent event) {
EditText username = (EditText) v.findViewById(R.id.et_username);
Log.d("key", "onKey: "+keyCode);
Log.d("key", "onKey: "+event);
if(keyCode == KeyEvent.KEYCODE_DEL){
Toast.makeText(MainActivity.this, "delete this", Toast.LENGTH_SHORT).show();
return true;
}
return true;
}
});

I Need to press long enough to delete the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant