Java 类android.widget.Filter 实例源码
项目:revolution-irc
文件:ChatAutoCompleteEditText.java
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();
}
});
}
项目:revolution-irc
文件:AutoRunCommandListEditText.java
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();
});
}
项目:GCSApp
文件:EaseConversationAdapter.java
@Override
public Filter getFilter() {
if (conversationFilter == null) {
conversationFilter = new ConversationFilter(conversationList);
}
return conversationFilter;
}
项目:Movie-Notifier-Android
文件:CinemaIDAdapter.java
@NonNull
@Override
public Filter getFilter() {
if (filter == null) {
filter = new CinemaIDFilter();
}
return filter;
}
项目:2017.1-Trezentos
文件:ClassAdapter.java
@Override
public Filter getFilter() {
if (friendFilter == null) {
friendFilter = new FriendFilter(userClasses, this);
}
return friendFilter;
}
项目:FanChat
文件:EaseContactAdapter.java
@Override
public Filter getFilter() {
if(myFilter==null){
myFilter = new MyFilter(userList);
}
return myFilter;
}
项目:markor
文件:FilesystemDialogAdapter.java
@Override
public Filter getFilter() {
if (_filter == null) {
_filter = new StringFilter(this, _adapterData);
}
return _filter;
}
项目:crockpod
文件:AutoCompleteSearchViewTest.java
@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);
}
项目:Moodr
文件:LatestMoodListAdapter.java
@Override
public Filter getFilter() {
if (moodFilter == null) {
moodFilter = new MoodFilterHolder(this, origMoods);
}
return moodFilter.getFilter();
}
项目:browser
文件:SearchAdapter.java
@Override
public Filter getFilter() {
if (mFilter == null) {
mFilter = new SearchFilter();
}
return mFilter;
}
项目:Android-FileBrowser-FilePicker
文件:CustomAdapter.java
@Override
public Filter getFilter() {
if (mFileFilter == null) {
mFileFilter = new FileFilter();
}
return mFileFilter;
}
项目:polling-station-app
文件:ElectionsAdapter.java
/**
* Get the custom election filter
* @return filter
*/
@Override
public Filter getFilter() {
if (electionFilter == null) {
electionFilter = new ElectionFilter();
}
return electionFilter;
}
项目:chips-input-layout
文件:FilterableChipsAdapter.java
@Override
public Filter getFilter() {
if (filter == null) {
this.filter = new ChipFilter();
}
return filter;
}
项目:EosCommander
文件:AccountAdapter.java
@Override
public @NonNull Filter getFilter() {
if (mFilter == null) {
mFilter = new AccountFilter();
}
return mFilter;
}
项目:search-dialog
文件:BaseSearchDialogCompat.java
public BaseSearchDialogCompat(Context context, ArrayList<T> items, Filter filter,
RecyclerView.Adapter adapter,
FilterResultListener filterResultListener) {
this(context);
mItems = items;
mFilter = filter;
mAdapter = adapter;
mFilterResultListener = filterResultListener;
}
项目:android-apps
文件:MyBaseAdapterFilter.java
@Override
public Filter getFilter() {
if (arrayFilter == null) {
arrayFilter = new ArrayFilter();
}
return arrayFilter;
}
项目:KTalk
文件:EaseContactAdapter.java
@Override
public Filter getFilter() {
if(myFilter==null){
myFilter = new MyFilter(userList);
}
return myFilter;
}
项目:KTalk
文件:EaseConversationAdapter.java
@Override
public Filter getFilter() {
if (conversationFilter == null) {
conversationFilter = new ConversationFilter(conversationList);
}
return conversationFilter;
}
项目:MaterialChipsInput
文件:FilterableListView.java
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();
}
});
}
项目:Tribe
文件:EaseContactAdapter.java
@Override
public Filter getFilter() {
if(myFilter==null){
myFilter = new MyFilter(userList);
}
return myFilter;
}
项目:Tribe
文件:EaseConversationAdapter.java
@Override
public Filter getFilter() {
if (conversationFilter == null) {
conversationFilter = new ConversationFilter(conversationList);
}
return conversationFilter;
}
项目:Tribe
文件:EaseConversationAdapter.java
@Override
public Filter getFilter() {
if (conversationFilter == null) {
conversationFilter = new ConversationFilter(conversationList);
}
return conversationFilter;
}
项目:IslamicLibraryAndroid
文件:TableOfContentRecyclerViewAdapter.java
@Override
public Filter getFilter() {
if (mFilter == null) {
mFilter = new TitlesFilter();
}
return mFilter;
}
项目:IslamicLibraryAndroid
文件:BookCategoryRecyclerViewAdapter.java
@Override
public Filter getFilter() {
if (mFilter == null) {
mFilter = new BookGridFilter();
}
return mFilter;
}
项目:exciting-app
文件:HeaderViewListAdapter.java
@Override
public Filter getFilter() {
if (mIsFilterable) {
return ((Filterable) mAdapter).getFilter();
}
return null;
}
项目:youkes_browser
文件:SearchAdapter.java
@Override
public Filter getFilter() {
if (mFilter == null) {
mFilter = new SearchFilter();
}
return mFilter;
}
项目:StopApp
文件:AppListAdapter.java
@Override
public Filter getFilter() {
if (mAppFilter == null) {
mAppFilter = new AppFilter();
mOriginalAppInfo = getData();
}
return mAppFilter;
}
项目:CodeCompilerApp
文件:AdapterDetailedList.java
@Override
public Filter getFilter() {
if (customFilter == null) {
customFilter = new CustomFilter();
}
return customFilter;
}
项目:StopApp
文件:DisableAppAdapter.java
@Override
public Filter getFilter() {
if (mAppFilter == null) {
mAppFilter = new AppFilter();
mOriginalAppInfo = getData();
}
return mAppFilter;
}
项目:javaide
文件:SortedFilterArrayAdapter.java
/**
* {@inheritDoc}
*/
public Filter getFilter() {
if (mFilter == null) {
mFilter = new ArrayFilter();
}
return mFilter;
}
项目:aos-Video
文件:HeaderGridView.java
@Override
public Filter getFilter() {
if (mIsFilterable) {
return ((Filterable) mAdapter).getFilter();
}
return null;
}
项目:GCSApp
文件:PublicChatRoomsActivity.java
@Override
public Filter getFilter(){
if(filter == null){
filter = new RoomFilter();
}
return filter;
}
项目:Slide-RSS
文件:SideArrayAdapter.java
@Override
public Filter getFilter() {
if (filter == null) {
filter = new SubFilter();
}
return filter;
}
项目:MyAnimeViewer
文件:HeaderGridView.java
@Override
public Filter getFilter() {
if (mIsFilterable) {
return ((Filterable) mAdapter).getFilter();
}
return null;
}
项目:MyAnimeViewer
文件:HistoryRecyclerAdapter.java
@Override
public Filter getFilter() {
switch (mFilterType) {
case 0:
mFilter = new HistoryRecordFilter();
break;
case 1:
mFilter = new HistoryRecordCustomFilter();
break;
}
return mFilter;
}
项目:MyAnimeViewer
文件:FlexibleAdapter.java
/**
* {@inheritDoc}
*/
public Filter getFilter() {
if (mFilter == null) {
mFilter = new FlexibleFilter();
}
return mFilter;
}
项目:MyAnimeViewer
文件:AnimeRecyclerAdapter.java
@Override
public Filter getFilter() {
switch (mFilterType) {
case 0:
mFilter = new AnimeFilter();
break;
case 1:
mFilter = new AnimeCustomFilter();
break;
}
return mFilter;
}
项目:MyAnimeViewer
文件:LibraryRecyclerAdapter.java
@Override
public Filter getFilter() {
if (mFilter == null)
mFilter = new FileFilter();
return mFilter;
}
项目:MyAnimeViewer
文件:OfflineHistoryRecyclerAdapter.java
@Override
public Filter getFilter() {
switch (mFilterType) {
case 0:
mFilter = new RecordFilter();
break;
case 1:
mFilter = new RecordCustomFilter();
break;
}
return mFilter;
}
项目:q-mail
文件:FolderList.java
public Filter getFilter() {
return mFilter;
}