arimorty / floatingsearchview

A search view that implements a floating search bar also known as persistent search
https://github.com/arimorty/floatingsearchview/blob/master/README.md
Apache License 2.0
3.54k stars 667 forks source link

The search icon appears only when you click the view : Android 7.0 #246

Open KevCel opened 7 years ago

KevCel commented 7 years ago

ezgif com-video-to-gif

My code: <com.arlib.floatingsearchview.FloatingSearchView android:id="@+id/search_view" android:layout_width="match_parent" android:layout_height="match_parent" app:floatingSearch_leftActionMode="showSearch" fancy:floatingSearch_searchHint="@string/search_local_or_food" app:floatingSearch_searchBarMarginTop="32dp" app:floatingSearch_searchBarMarginRight="@dimen/margin_list_item" app:floatingSearch_searchBarMarginLeft="@dimen/margin_list_item" app:floatingSearch_searchInputTextSize="4dp" app:floatingSearch_close_search_on_keyboard_dismiss="true" />

KevCel commented 7 years ago

Icon is disappeared only for fancy:floatingSearch_leftActionMode="showSearch".

It's my temporary solution: binding.searchView.postDelayed(new Runnable() { @Override public void run() { binding.searchView.setSelected(true); binding.searchView.setQueryTextSize(13); binding.searchView.setLeftActionMode(FloatingSearchView.LEFT_ACTION_MODE_SHOW_SEARCH); binding.searchView.setLeftMenuOpen(true); } }, 100);