Skip to content Skip to sidebar Skip to footer

Android Virtual Keyboard Listener

Though i have asked the question before but dint get any proper answer. I have an EditText when edit text is focused android virtual keyboard pops up, i have added Done button to t

Solution 1:

you an do it by firest finding reference of edittext and than set belows code for ur edittext:


 editText.setOnEditorActionListener(newTextView.OnEditorActionListener() {
    @OverridepublicbooleanonEditorAction(TextView v, int actionId, KeyEvent event) {
        if (actionId == EditorInfo.IME_ACTION_SEARCH) {
            performSearch();//do here your stuff freturntrue;
        }
        returnfalse;
    }
  });

here i have taken editText name which is ref. editextbox which u added and you have to add actionId==type of ime options which u have setted

Post a Comment for "Android Virtual Keyboard Listener"