本文整理了Java中android.widget.SearchView.requestFocus()
方法的一些代码示例,展示了SearchView.requestFocus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SearchView.requestFocus()
方法的具体详情如下:
包路径:android.widget.SearchView
类名称: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;
内容来源于网络,如有侵权,请联系作者删除!