User Profile

op gupta QnA

op gupta

  • 0Followers
  • 0Experience
  • 1Questions
  • op gupta QnA

    op gupta started a new conversation detect keyboard search button/get keyboard Search button click 2 months ago ago

    I am trying to use this However that gives me error .

    etSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
        @Override
        public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
            if (actionId == EditorInfo.IME_ACTION_SEARCH) {
                index = 0;
                offset = 20;
                sr_id = etSearch.getText().toString();
                if (sr_id.length()>0)
                { performSearch();
                }
                else {
                    sr_id="";
                    performSearch();
                }
                return true;
            }
            return false;
        }
    });