当前位置: 首页>>代码示例>>Java>>正文


Java Filterable类代码示例

本文整理汇总了Java中android.widget.Filterable的典型用法代码示例。如果您正苦于以下问题:Java Filterable类的具体用法?Java Filterable怎么用?Java Filterable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Filterable类属于android.widget包,在下文中一共展示了Filterable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onTextChanged

import android.widget.Filterable; //导入依赖的package包/类
private void onTextChanged(CharSequence newText) {
    CharSequence text = mEditText.getText();
    mUserQuery = text;
    if (mAdapter != null && mAdapter instanceof Filterable) {
        ((Filterable) mAdapter).getFilter().filter(text);
    }
    if (mOnQueryChangeListener != null && !TextUtils.equals(newText, mOldQueryText)) {
        dispatchFilters();
        mOnQueryChangeListener.onQueryTextChange(newText.toString());
    }
    mOldQueryText = newText.toString();

    if (!TextUtils.isEmpty(newText)) {
        showClearTextIcon();
    } else {
        hideClearTextIcon();
    }
}
 
开发者ID:sega4revenge,项目名称:Sega,代码行数:19,代码来源:SearchView.java

示例2: HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewListAdapter(ArrayList<FixedViewInfo> headerViewInfos,
		ArrayList<FixedViewInfo> footerViewInfos, ListAdapter adapter) {
	mAdapter = adapter;
	mIsFilterable = adapter instanceof Filterable;

	if (headerViewInfos == null) {
		mHeaderViewInfos = EMPTY_INFO_LIST;
	} else {
		mHeaderViewInfos = headerViewInfos;
	}

	if (footerViewInfos == null) {
		mFooterViewInfos = EMPTY_INFO_LIST;
	} else {
		mFooterViewInfos = footerViewInfos;
	}

	mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos)
			&& areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:junchenChow,项目名称:exciting-app,代码行数:21,代码来源:HeaderViewListAdapter.java

示例3: PLA_HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public PLA_HeaderViewListAdapter(ArrayList<PLA_ListView$FixedViewInfo> headerViewInfos,
                                 ArrayList<PLA_ListView$FixedViewInfo> footerViewInfos,
                                 ListAdapter adapter) {
    this.mAdapter = adapter;
    this.mIsFilterable = adapter instanceof Filterable;
    if (headerViewInfos == null) {
        this.mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        this.mHeaderViewInfos = headerViewInfos;
    }
    if (footerViewInfos == null) {
        this.mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        this.mFooterViewInfos = footerViewInfos;
    }
    boolean z = areAllListInfosSelectable(this.mHeaderViewInfos) && areAllListInfosSelectable
            (this.mFooterViewInfos);
    this.mAreAllFixedViewsSelectable = z;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:20,代码来源:PLA_HeaderViewListAdapter.java

示例4: PLA_HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public PLA_HeaderViewListAdapter(ArrayList<PLA_ListView.FixedViewInfo> headerViewInfos,
                             ArrayList<PLA_ListView.FixedViewInfo> footerViewInfos,
                             ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
            && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:Shmilyz,项目名称:Swap,代码行数:23,代码来源:PLA_HeaderViewListAdapter.java

示例5: HeaderViewGridAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewGridAdapter(ArrayList<FixedViewInfo> headerViewInfos, ArrayList<FixedViewInfo> footViewInfos, ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;
    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footViewInfos;
    }
    mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos)
            && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:LegendKe,项目名称:MyTravelingDiary,代码行数:18,代码来源:GridViewWithHeaderAndFooter.java

示例6: HeaderViewGridAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewGridAdapter(ArrayList<FixedViewInfo> headerViewInfos, ArrayList<FixedViewInfo> footViewInfos, ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;
    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footViewInfos;
    }
    mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos)
        && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:joy-inc,项目名称:joy-library,代码行数:18,代码来源:ObservableGridView.java

示例7: setAdapter

import android.widget.Filterable; //导入依赖的package包/类
@Override
public <T extends ListAdapter & Filterable> void setAdapter(T adapter) {
    super.setAdapter(adapter);
    BaseRecipientAdapter baseAdapter = (BaseRecipientAdapter) adapter;
    baseAdapter.registerUpdateObserver(new BaseRecipientAdapter.EntriesUpdatedObserver() {
        @Override
        public void onChanged(List<RecipientEntry> entries) {
            // Scroll the chips field to the top of the screen so
            // that the user can see as many results as possible.
            if (entries != null && entries.size() > 0) {
                scrollBottomIntoView();
            }
        }
    });
    baseAdapter.setDropdownChipLayouter(mDropdownChipLayouter);
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:17,代码来源:RecipientEditTextView.java

示例8: PLAHeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public PLAHeaderViewListAdapter(ArrayList<PLAListView.FixedViewInfo> headerViewInfos,
                                ArrayList<PLAListView.FixedViewInfo> footerViewInfos,
                                ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
            && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:Dreamer206602,项目名称:SimplifyReader2,代码行数:23,代码来源:PLAHeaderViewListAdapter.java

示例9: HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewListAdapter(ArrayList<FixedViewInfo> headerViewInfos,
                             ArrayList<FixedViewInfo> footerViewInfos,
                             ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
            && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:cheyiliu,项目名称:test4XXX,代码行数:23,代码来源:HeaderViewListAdapter.java

示例10: HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewListAdapter(ArrayList<StaggeredGridView.FixedViewInfo> headerViewInfos,
                             ArrayList<StaggeredGridView.FixedViewInfo> footerViewInfos,
                             ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
                    && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:harichen,项目名称:PullToRefreshLibrary,代码行数:23,代码来源:HeaderViewListAdapter.java

示例11: HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewListAdapter(ArrayList<FixedViewInfo> headerViewInfos, ArrayList<FixedViewInfo> footerViewInfos, ListAdapter adapter) {
	mAdapter = adapter;
	mIsFilterable = adapter instanceof Filterable;

	if (headerViewInfos == null) {
		mHeaderViewInfos = EMPTY_INFO_LIST;
	} else {
		mHeaderViewInfos = headerViewInfos;
	}

	if (footerViewInfos == null) {
		mFooterViewInfos = EMPTY_INFO_LIST;
	} else {
		mFooterViewInfos = footerViewInfos;
	}

	mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos) && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:lingganhezi,项目名称:dedecmsapp,代码行数:19,代码来源:HeaderViewListAdapter.java

示例12: HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewListAdapter(ArrayList<ExtendableListView.FixedViewInfo> headerViewInfos,
                             ArrayList<ExtendableListView.FixedViewInfo> footerViewInfos,
                             ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
                    && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:qbeenslee,项目名称:Nepenthes-Android,代码行数:23,代码来源:HeaderViewListAdapter.java

示例13: HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewListAdapter(ArrayList<StaggeredGridView.FixedViewInfo> headerViewInfos, ArrayList<StaggeredGridView.FixedViewInfo> footerViewInfos, ListAdapter adapter)
{
	mAdapter = adapter;
	mIsFilterable = adapter instanceof Filterable;

	if (headerViewInfos == null)
	{
		mHeaderViewInfos = EMPTY_INFO_LIST;
	}
	else
	{
		mHeaderViewInfos = headerViewInfos;
	}

	if (footerViewInfos == null)
	{
		mFooterViewInfos = EMPTY_INFO_LIST;
	}
	else
	{
		mFooterViewInfos = footerViewInfos;
	}

	mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos) && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:haikuowuya,项目名称:like_googleplus_layout,代码行数:26,代码来源:HeaderViewListAdapter.java

示例14: FilterWidgetSupport

import android.widget.Filterable; //导入依赖的package包/类
public FilterWidgetSupport(MenuItem searchMenuItem, final Filterable filterable) {
    this.searchMenuItem = searchMenuItem;
    searchViewStrategy = (Build.VERSION.SDK_INT >= HONEYCOMB) ? new HoneycombStrategy() : new LegacyStrategy();
    searchViewStrategy.setup(searchMenuItem, new SearchViewStrategy.OnFilterTextListener() {
        public void onFilterTextChange(String newText) {
            Filter filter = filterable.getFilter();
            if (filter != null)
                filter.filter(newText);
        }

        public void onFilterTextSubmit(String query) {
            Log.d(TAG, "onFilterTextSubmit : '"+query+"'");
            clearSearchViewOnSubmit();
        }
    });
}
 
开发者ID:m4rzEE1,项目名称:ninja_chic-,代码行数:17,代码来源:FilterWidgetSupport.java

示例15: HeaderViewListAdapter

import android.widget.Filterable; //导入依赖的package包/类
public HeaderViewListAdapter(List<ViewInfo> headerViewInfos,
                             List<ViewInfo> footerViewInfos, ListAdapter adapter, ListAdapterCallback listener) {
    super(adapter, listener);
    mIsFilterable = adapter instanceof Filterable;
    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }
    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }
    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
                    && areAllListInfosSelectable(mFooterViewInfos);
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:19,代码来源:HeaderViewListAdapter.java


注:本文中的android.widget.Filterable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。