Sunday 15 February 2015

java - android EditText, remove focus when clicking another object -



java - android EditText, remove focus when clicking another object -

can help me, im beginner in android development, edittext focused, , want remove focus when clicking other object, example, listview, button... want edittext focus when user clicks onto it

you can seek using clearfocus() method on edittext..

edittext txt; txt=(edittext) findviewbyid(r.id.somename); txt.clearfocus();

or can use

private void hidedefaultkeyboard() { activity.getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_state_always_hidden);//u have got lot of methods here }

java android xml android-layout

No comments:

Post a Comment