Java 类android.support.v17.leanback.widget.SearchBar 实例源码

项目:android_packages_apps_tv    文件:ProgramGuideSearchFragment.java   
@Override
public void onResume() {
    super.onResume();

    SearchBar searchBar = (SearchBar) getView().findViewById(R.id.lb_search_bar);
    searchBar.setSearchQuery("");
    mResultAdapter.clear();
}
项目:RxBinding    文件:RxSearchBar.java   
/**
 * An action which sets the searchQuery property of {@code view} with String values.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code view}. Unsubscribe
 * to free this reference.
 */
@CheckResult @NonNull
public static Consumer<? super String> searchQuery(@NonNull final SearchBar view) {
  checkNotNull(view, "view == null");
  return new Consumer<String>() {
    @Override public void accept(String text) throws Exception {
      view.setSearchQuery(text);
    }
  };
}
项目:RxBinding    文件:RxSearchBarTestActivity.java   
@Override protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  setContentView(R.layout.lb_search_fragment);

  searchBar = (SearchBar) findViewById(R.id.lb_search_bar);
  searchEditText = (SearchEditText) searchBar.findViewById(R.id.lb_search_text_editor);

  // reduce flakiness
  SearchOrbView searchOrbView = (SearchOrbView) searchBar.findViewById(R.id.lb_search_bar_speech_orb);
  searchOrbView.enableOrbColorAnimation(false);
  searchOrbView.setSoundEffectsEnabled(false);
  searchOrbView.clearAnimation();
}
项目:RxBinding    文件:SearchBarSearchQueryKeyboardDismissedEvent.java   
@CheckResult @NonNull
public static SearchBarSearchQueryKeyboardDismissedEvent create(@NonNull SearchBar view,
    @NonNull String query) {
  return new AutoValue_SearchBarSearchQueryKeyboardDismissedEvent(view, query);
}
项目:RxBinding    文件:SearchBarSearchQueryChangeEventsOnSubscribe.java   
SearchBarSearchQueryChangeEventsOnSubscribe(SearchBar view) {
  this.view = view;
}
项目:RxBinding    文件:SearchBarSearchQueryChangeEventsOnSubscribe.java   
Listener(SearchBar view, Observer<? super SearchBarSearchQueryEvent> observer) {
  this.view = view;
  this.observer = observer;
}
项目:RxBinding    文件:SearchBarSearchQueryEvent.java   
/** The view from which this event occurred. */
@NonNull public abstract SearchBar view();
项目:RxBinding    文件:SearchBarSearchQuerySubmittedEvent.java   
@CheckResult @NonNull
public static SearchBarSearchQuerySubmittedEvent create(@NonNull SearchBar view,
    @NonNull String query) {
  return new AutoValue_SearchBarSearchQuerySubmittedEvent(view, query);
}
项目:RxBinding    文件:SearchBarSearchQueryChangesOnSubscribe.java   
SearchBarSearchQueryChangesOnSubscribe(SearchBar view) {
  this.view = view;
}
项目:RxBinding    文件:SearchBarSearchQueryChangesOnSubscribe.java   
Listener(SearchBar view, Observer<? super String> observer) {
  this.view = view;
  this.observer = observer;
}
项目:RxBinding    文件:SearchBarSearchQueryChangedEvent.java   
@CheckResult @NonNull
public static SearchBarSearchQueryChangedEvent create(@NonNull SearchBar view,
    @NonNull String query) {
  return new AutoValue_SearchBarSearchQueryChangedEvent(view, query);
}
项目:RxBinding    文件:RxSearchBar.java   
/**
 * Create an observable of {@linkplain SearchBarSearchQueryEvent search query events} on {@code
 * view}.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code view}. Unsubscribe
 * to free this reference.
 * <p>
 */
@CheckResult
@NonNull
public static Observable<SearchBarSearchQueryEvent> searchQueryChangeEvents(
        @NonNull SearchBar view) {
  checkNotNull(view, "view == null");
  return new SearchBarSearchQueryChangeEventsOnSubscribe(view);
}
项目:RxBinding    文件:RxSearchBar.java   
/**
 * Create an observable of String values for search query changes on {@code view}.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code view}. Unsubscribe
 * to free this reference.
 * <p>
 */
@CheckResult @NonNull
public static Observable<String> searchQueryChanges(@NonNull SearchBar view) {
  checkNotNull(view, "view == null");
  return new SearchBarSearchQueryChangesOnSubscribe(view);
}