android.widget.SearchView.requestFocus()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(144)

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

SearchView.requestFocus介绍

暂无

代码示例

代码示例来源:origin: r7v/Tweetz

@Override public void onEnterAnimationComplete() {
  super.onEnterAnimationComplete();
  // focus the search view once the enter transition finishes
  binding.searchView.requestFocus();
  ImeUtils.showIme(binding.searchView);
}

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

searchView.setFocusable(true);
searchView.setFocusableInTouchMode(true);
searchView.requestFocus();
searchView.requestFocusFromTouch();

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

searchView.setFocusable(true);
searchView.setFocusableInTouchMode(true);
searchView.requestFocus();
searchView.requestFocusFromTouch();

代码示例来源:origin: TeamWalrus/Walrus

@Override
public boolean onOptionsItemSelected(MenuItem item) {
  switch (item.getItemId()) {
    case R.id.search:
      sv.setVisibility(View.VISIBLE);
      sv.requestFocus();
      return true;
    case R.id.bulk_read_cards:
      startActivity(new Intent(this, BulkReadCardsActivity.class));
      return true;
    case R.id.devices:
      startActivity(new Intent(this, DevicesActivity.class));
      return true;
    case R.id.settings:
      startActivity(new Intent(this, SettingsActivity.class));
      return true;
    default:
      return super.onOptionsItemSelected(item);
  }
}

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

mSearchView.requestFocus();
return true;

相关文章