android.widget.TextView.focusSearch()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中android.widget.TextView.focusSearch()方法的一些代码示例,展示了TextView.focusSearch()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.focusSearch()方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:focusSearch

TextView.focusSearch介绍

暂无

代码示例

代码示例来源:origin: derry/delion

@Override
  public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_DONE) {
      mDoneButton.performClick();
      return true;
    } else if (actionId == EditorInfo.IME_ACTION_NEXT) {
      View next = v.focusSearch(View.FOCUS_FORWARD);
      if (next != null && next instanceof AutoCompleteTextView) {
        focusInputField(next);
        return true;
      }
    }
    return false;
  }
};

代码示例来源:origin: stackoverflow.com

TextView v1 = (TextView) v.focusSearch(View.FOCUS_RIGHT);
if (v1 != null)
  result = v1.requestFocus(View.FOCUS_RIGHT);
else if (!result)
  v1 = (TextView) v.focusSearch(View.FOCUS_DOWN);
  if (v1 != null)
    result = v1.requestFocus(View.FOCUS_DOWN);

相关文章

TextView类方法