FloatingSearchView 介绍
FloatingSearchView 是浮动搜索视图,实现了一个浮动的搜索框和搜索建议。
<com.arlib.floatingsearchview.FloatingSearchView android:id="@+id/floating_search_view" android:layout_width="match_parent" android:layout_height="match_parent" app:floatingSearch_searchBarMarginLeft="@dimen/search_view_inset" app:floatingSearch_searchBarMarginTop="@dimen/search_view_inset" app:floatingSearch_searchBarMarginRight="@dimen/search_view_inset" app:floatingSearch_showMenuAction="true" app:floatingSearch_searchHint="Search..." app:floatingSearch_voiceRecHint="Say something..." app:floatingSearch_showSearchHintWhenNotFocused="true" app:floatingSearch_showVoiceInput="true" app:floatingSearch_showOverFlowMenu="true" app:floatingSearch_hideOverflowMenuWhenFocused="true" app:floatingSearch_showSearchKey="false" app:floatingSearch_dismissOnOutsidetouch="true" app:floatingSearch_menu="@menu/menu_main"/> mSearchView.setonQuerychangelistener(new FloatingSearchView.OnQuerychangelistener() { @Override public void onSearchTextChanged(String oldQuery, final String newQuery) { //get suggestions based on newQuery //pass them on to the search view mSearchView.swapSuggestions(newSuggestions); } });
FloatingSearchView 官网
https://github.com/arimorty/floatingsearchview
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。