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

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

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

SearchView.isIconified介绍

暂无

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public void onSaveInstanceState(Bundle state) {
 super.onSaveInstanceState(state);
 if (!sv.isIconified()) {
  state.putString(STATE_QUERY, sv.getQuery().toString());
 }
}

代码示例来源:origin: square/assertj-android

public SearchViewAssert isIconified() {
 isNotNull();
 assertThat(actual.isIconified()) //
   .overridingErrorMessage("Expected to be iconified but was not.") //
   .isTrue();
 return this;
}

代码示例来源:origin: square/assertj-android

public SearchViewAssert isNotIconified() {
 isNotNull();
 assertThat(actual.isIconified()) //
   .overridingErrorMessage("Expected to not be iconified but was not.") //
   .isFalse();
 return this;
}

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public void onSaveInstanceState(Bundle state) {
 super.onSaveInstanceState(state);
 if (!sv.isIconified()) {
  state.putCharSequence(STATE_QUERY, sv.getQuery());
 }
 state.putStringArrayList(STATE_MODEL, words);
}

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

private final OnLayoutChangeListener _searchExpandHandler = new OnLayoutChangeListener()
 {
 @Override
 public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight,
     int oldBottom)
   {
   SearchView searchView = (SearchView)v;
   if (searchView.isIconfiedByDefault() && !searchView.isIconified())
     {
     // search got expanded from icon to search box, hide tabs to make space
     getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
     }
   }
 };

代码示例来源:origin: kingargyle/adt-leanback-support

public static boolean isIconified(View searchView) {
  return ((SearchView) searchView).isIconified();
}

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

public void onBackPressed() {
  //...
  SearchView searchView = ((FragmentListProduct)currentFragment).getSearchView();
  if (searchView != null) {
    if (searchView.isIconified()) {
     // the search is extended
     searchView.setIconified(true);
    } else {
     // the search view is closed
    }
  }

/...
}

代码示例来源:origin: com.squareup.assertj/assertj-android

public SearchViewAssert isIconified() {
 isNotNull();
 assertThat(actual.isIconified()) //
   .overridingErrorMessage("Expected to be iconified but was not.") //
   .isTrue();
 return this;
}

代码示例来源:origin: com.squareup.assertj/assertj-android

public SearchViewAssert isNotIconified() {
 isNotNull();
 assertThat(actual.isIconified()) //
   .overridingErrorMessage("Expected to not be iconified but was not.") //
   .isFalse();
 return this;
}

相关文章