private void performFiltering(boolean completeIfSingle) { if (!updateCompletingCommandFlags()) mAdapter.setEnabledSuggestions(true, mDoChannelSuggestions, false); final String text = getCurrentToken(); Filter filter = isCommandNameToken() ? mCommandAdapter.getFilter() : mAdapter.getFilter(); filter.filter(text, (int i) -> { if (i == 0) { dismissDropDown(); return; } if (!getCurrentToken().equals(text) && !enoughToFilter()) return; if (completeIfSingle && i == 1) { if (filter == mCommandAdapter.getFilter()) onItemClick(mCommandAdapter.getItem(0)); else onItemClick(mAdapter.getItem(0)); return; } if (i > 0) { setCurrentCommandAdapter(filter == mCommandAdapter.getFilter()); showDropDown(); } }); }
private void performFiltering(boolean completeIfSingle) { final CharSequence text = getCurrentLineToken(); if (text == null) return; Filter filter = mCommandAdapter.getFilter(); filter.filter(text, (int i) -> { if (i == 0) { dismissDropDown(); return; } if (!text.equals(getCurrentLineToken()) && !enoughToFilter()) return; if (completeIfSingle && i == 1) { onItemClick(mCommandAdapter.getItem(0)); return; } if (i > 0) showDropDown(); }); }
@Override public Filter getFilter() { if (conversationFilter == null) { conversationFilter = new ConversationFilter(conversationList); } return conversationFilter; }
@NonNull @Override public Filter getFilter() { if (filter == null) { filter = new CinemaIDFilter(); } return filter; }
@Override public Filter getFilter() { if (friendFilter == null) { friendFilter = new FriendFilter(userClasses, this); } return friendFilter; }
@Override public Filter getFilter() { if(myFilter==null){ myFilter = new MyFilter(userList); } return myFilter; }
@Override public Filter getFilter() { if (_filter == null) { _filter = new StringFilter(this, _adapterData); } return _filter; }
@Before public void setUp() throws Exception { Context context = RuntimeEnvironment.application.getApplicationContext(); adapter = mock(ArrayAdapter.class); Filter filter = mock(Filter.class); when(adapter.getFilter()).thenReturn(filter); view = new AutoCompleteSearchView(context, null); }
@Override public Filter getFilter() { if (moodFilter == null) { moodFilter = new MoodFilterHolder(this, origMoods); } return moodFilter.getFilter(); }
@Override public Filter getFilter() { if (mFilter == null) { mFilter = new SearchFilter(); } return mFilter; }
@Override public Filter getFilter() { if (mFileFilter == null) { mFileFilter = new FileFilter(); } return mFileFilter; }
/** * Get the custom election filter * @return filter */ @Override public Filter getFilter() { if (electionFilter == null) { electionFilter = new ElectionFilter(); } return electionFilter; }
@Override public Filter getFilter() { if (filter == null) { this.filter = new ChipFilter(); } return filter; }
@Override public @NonNull Filter getFilter() { if (mFilter == null) { mFilter = new AccountFilter(); } return mFilter; }
public BaseSearchDialogCompat(Context context, ArrayList<T> items, Filter filter, RecyclerView.Adapter adapter, FilterResultListener filterResultListener) { this(context); mItems = items; mFilter = filter; mAdapter = adapter; mFilterResultListener = filterResultListener; }
@Override public Filter getFilter() { if (arrayFilter == null) { arrayFilter = new ArrayFilter(); } return arrayFilter; }
public void filterList(CharSequence text) { mAdapter.getFilter().filter(text, new Filter.FilterListener() { @Override public void onFilterComplete(int count) { // show if there are results if(mAdapter.getItemCount() > 0) fadeIn(); else fadeOut(); } }); }
@Override public Filter getFilter() { if (mFilter == null) { mFilter = new TitlesFilter(); } return mFilter; }
@Override public Filter getFilter() { if (mFilter == null) { mFilter = new BookGridFilter(); } return mFilter; }
@Override public Filter getFilter() { if (mIsFilterable) { return ((Filterable) mAdapter).getFilter(); } return null; }
@Override public Filter getFilter() { if (mAppFilter == null) { mAppFilter = new AppFilter(); mOriginalAppInfo = getData(); } return mAppFilter; }
@Override public Filter getFilter() { if (customFilter == null) { customFilter = new CustomFilter(); } return customFilter; }
/** * {@inheritDoc} */ public Filter getFilter() { if (mFilter == null) { mFilter = new ArrayFilter(); } return mFilter; }
@Override public Filter getFilter(){ if(filter == null){ filter = new RoomFilter(); } return filter; }
@Override public Filter getFilter() { if (filter == null) { filter = new SubFilter(); } return filter; }
@Override public Filter getFilter() { switch (mFilterType) { case 0: mFilter = new HistoryRecordFilter(); break; case 1: mFilter = new HistoryRecordCustomFilter(); break; } return mFilter; }
/** * {@inheritDoc} */ public Filter getFilter() { if (mFilter == null) { mFilter = new FlexibleFilter(); } return mFilter; }
@Override public Filter getFilter() { switch (mFilterType) { case 0: mFilter = new AnimeFilter(); break; case 1: mFilter = new AnimeCustomFilter(); break; } return mFilter; }
@Override public Filter getFilter() { if (mFilter == null) mFilter = new FileFilter(); return mFilter; }
@Override public Filter getFilter() { switch (mFilterType) { case 0: mFilter = new RecordFilter(); break; case 1: mFilter = new RecordCustomFilter(); break; } return mFilter; }
public Filter getFilter() { return mFilter; }