本文整理了Java中android.widget.SearchView.setOnQueryTextFocusChangeListener()
方法的一些代码示例,展示了SearchView.setOnQueryTextFocusChangeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SearchView.setOnQueryTextFocusChangeListener()
方法的具体详情如下:
包路径:android.widget.SearchView
类名称:SearchView
方法名:setOnQueryTextFocusChangeListener
暂无
代码示例来源:origin: sh0/kotoba-android
m_search_view.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener(){
public void onFocusChange(View view, boolean has_focus) {
if (!has_focus) {
代码示例来源:origin: stackoverflow.com
search.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
代码示例来源:origin: stackoverflow.com
private void initSearchView(final Menu menu)
{
final SearchManager searchManager = (SearchManager) this.getSystemService(Context.SEARCH_SERVICE);
final MenuItem searchViewMenuItem = menu.findItem(R.id.menu_search);
final SearchView searchView = new SearchView(this.getSupportActionBar().getThemedContext());
searchView.setSearchableInfo(searchManager.getSearchableInfo(this.getComponentName()));
searchView.setIconifiedByDefault(false);
searchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener()
{
@Override
public void onFocusChange(final View v, final boolean hasFocus)
{
if (!hasFocus)
{
// Collapse the searchbox on ActionBar
searchViewMenuItem.collapseActionView();
}
}
});
}
代码示例来源:origin: stackoverflow.com
.setOnQueryTextFocusChangeListener(new OnFocusChangeListener() {
代码示例来源:origin: WeAreFairphone/FP2-Launcher
private void setupSearchView() {
mSearchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
代码示例来源:origin: stackoverflow.com
.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
代码示例来源:origin: stackoverflow.com
.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
代码示例来源:origin: grzegorznittner/chanu
searchView.setSubmitButtonEnabled(true);
searchView.setSearchableInfo(searchManager.getSearchableInfo(activity.getComponentName()));
searchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
内容来源于网络,如有侵权,请联系作者删除!