Usage with TabLayout and AppBarLayout
See original GitHub issueI’m using the MaterialSearchView with TabLayout, AppBarLayout and RecyclerView. The toolbar is hidden when the list is scrolling. I tried the following layouts:
A. The search view is below tabs:
AppBarLayout
ToolBar
TabLayout
MaterialSearchView
/AppBarLayout
B. The toolbar scrolling doesn’t work anymore:
AppBarLayout
FrameLayout
ToolBar
MaterialSearchView
/FrameLayout
TabLayout
/AppBarLayout
What I expect is the effect like the “My apps” section in the Play Store app. The search view is actually placed above the activity though. Any suggestions?
Issue Analytics
- State:
- Created 8 years ago
- Comments:21 (4 by maintainers)
Top Results From Across the Web
android - What is the difference between a TabLayout and an ...
TabLayout is another popular view type introduced in the Material Design Guidelines. It provides a horizontal layout to display tabs which are ...
Read more >TabLayout With ViewPager2, AppBarLayout and Toolbar
Using TabLayout With AppBarLayout, ViewPager2 in Kotlin. Follow steps below to use these widgets in newly created project –. Open res/values/strings.xml file.
Read more >AppBarLayout | Android Developers
AppBarLayout is a vertical LinearLayout which implements many of the features of material designs app bar concept, namely scrolling gestures ...
Read more >Android TabLayout and ViewPager - DigitalOcean
AppBarLayout android:layout_width="match_parent" ... Hence it's recommended to use RecyclerView instead. Note: Fragments that belong to a ...
Read more >Using TabLayout and ViewPager with CollapsingToolbarLayout
Using android TabLayout and new viewpager2 you can make your fragment layout inside tab layout to make them have expand collapse.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@pro100svitlo I had the same issue; I was able to get the search bar to show by adding this to the search view listener (Manually set the seach view to visible):
Still not working.
Even the sample code does not work, tried after clone.
On click on search button, the search box is not opened, but keyword does. setting in on onSearchViewShown function by setting visibility, does open the list but then the fragment and list behind are completely hidden.