onEditorAction回调花费的时间过多

时间:2018-07-25 10:50:38

标签: android android-edittext

onEditorAction回调发生的延迟太长,如何解决此问题?

OnEditorActionListener searchViewEditorActionListener = new TextView.OnEditorActionListener() {
      @Override
      public boolean onEditorAction (TextView v, int actionId, KeyEvent event) {

        if (actionId == EditorInfo.IME_ACTION_SEARCH) {


              performSearchAndUpdateUI();


          return true;
        }
        return false;
      }
    };

    if (mSearchViewEt != null) {
      mSearchViewEt.setOnEditorActionListener(searchViewEditorActionListener);
    }

0 个答案:

没有答案