本文整理匯總了Java中android.widget.Filter類的典型用法代碼示例。如果您正苦於以下問題:Java Filter類的具體用法?Java Filter怎麽用?Java Filter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Filter類屬於android.widget包,在下文中一共展示了Filter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: performFiltering
import android.widget.Filter; //導入依賴的package包/類
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();
}
});
}
示例2: performFiltering
import android.widget.Filter; //導入依賴的package包/類
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();
});
}
示例3: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public Filter getFilter() {
if (conversationFilter == null) {
conversationFilter = new ConversationFilter(conversationList);
}
return conversationFilter;
}
示例4: getFilter
import android.widget.Filter; //導入依賴的package包/類
@NonNull
@Override
public Filter getFilter() {
if (filter == null) {
filter = new CinemaIDFilter();
}
return filter;
}
示例5: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public Filter getFilter() {
if (friendFilter == null) {
friendFilter = new FriendFilter(userClasses, this);
}
return friendFilter;
}
示例6: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public Filter getFilter() {
if(myFilter==null){
myFilter = new MyFilter(userList);
}
return myFilter;
}
示例7: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public Filter getFilter() {
if (_filter == null) {
_filter = new StringFilter(this, _adapterData);
}
return _filter;
}
示例8: setUp
import android.widget.Filter; //導入依賴的package包/類
@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);
}
示例9: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public Filter getFilter() {
if (moodFilter == null) {
moodFilter = new MoodFilterHolder(this, origMoods);
}
return moodFilter.getFilter();
}
示例10: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public Filter getFilter() {
if (mFilter == null) {
mFilter = new SearchFilter();
}
return mFilter;
}
示例11: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public Filter getFilter() {
if (mFileFilter == null) {
mFileFilter = new FileFilter();
}
return mFileFilter;
}
示例12: getFilter
import android.widget.Filter; //導入依賴的package包/類
/**
* Get the custom election filter
* @return filter
*/
@Override
public Filter getFilter() {
if (electionFilter == null) {
electionFilter = new ElectionFilter();
}
return electionFilter;
}
示例13: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public Filter getFilter() {
if (filter == null) {
this.filter = new ChipFilter();
}
return filter;
}
示例14: getFilter
import android.widget.Filter; //導入依賴的package包/類
@Override
public @NonNull Filter getFilter() {
if (mFilter == null) {
mFilter = new AccountFilter();
}
return mFilter;
}
示例15: BaseSearchDialogCompat
import android.widget.Filter; //導入依賴的package包/類
public BaseSearchDialogCompat(Context context, ArrayList<T> items, Filter filter,
RecyclerView.Adapter adapter,
FilterResultListener filterResultListener) {
this(context);
mItems = items;
mFilter = filter;
mAdapter = adapter;
mFilterResultListener = filterResultListener;
}