Fix bottom bar in CoordinatorLayout –

Development issue/problem:

I have a CoordinatorLayout that contains an AppBarLayout and a FrameLayout that contains clippings.

One of the fragments contains a TabLayout at the top, a list via RecyclerView and a self-made toolbar at the bottom.

AppBarLayout is configured with app:layout_scrollFlags=scroll|enterAlways.

My problem is that the two toolbars are hidden when scrolling, AppBarLayout and my Home toolbar at the bottom. That’s the current behavior

I would like to repair the bottom homemade toolbar so that it remains visible, but I can’t do that.

This is the XML format of the extract.

EDIT1 : These issues seem to be the same problem.

How can I solve this problem?

Solution 1:

Try this layout:

Solution 2:

For example, you can try adding the collapse mode to your toolbar.

Your apartment seems to be in good condition.

I suggest you consult this link:

Solution 3:

Try this


Solution 4:

This behavior essentially removes the SCROLL flag from the AppBarLayout if the content to be scrolled in the dependent view (RecyclerView, NestedScrollView) is smaller than the height of the view, i.e. if scrolling is not required. It also makes it possible to bypass the display scrolling offset, which is normally done by AppBarLayout.ScrollingViewBehavior. Works well when adding, for example, a footer. For example a button, for the scroll view, or in the ViewPager, where the length of the content on each page may be different. 7d80467a470424f22c3

The answer can already be found on

Solution No 5:

To fix the bottom panel, you must first use the activity in which the tabs are present. Different fragments are used in this activity. Add yourLayout tab to this Active_main_tab.xml file.


To see fragments


Use app:layout_scrollFlags=scroll|enterAlways on the toolbar here to scroll.

The FragmentTabs public class expands the BaseFragment{

private ViewPager rootView;
private ViewPager ViewPager;
private TabLayout tabLayout;
private toolbar;
private ViewPagerAdapter viewPagerAdapter ;

public View onCreateView(LayoutInflater inflater, ViewGroup ViewGroupContainer, Bundle savedInstanceState) {
rootViewSearch = inflater.inflate(R.layout.fragment_tab, viewGroupContainer, false);
setUpFragmentObjects() ;

back to rootView;

private void initializeLayout() {
toolbar = (toolbar) rootView.findViewById(;
viewPager = (ViewPager) rootView.findViewById(;
tabLayout = (TabLayout) rootView.findViewById(;

private void setUpActionBar() {
actionBar = getApplicationContext().getSupportActionBar();
if(actionBar != null){

private void setUpFragmentObjects() {
viewPagerAdapter = new ViewPagerAdapter(getApplicationContext(), getChildFragmentManager());

See the .java homepage adapter

The ViewPagerAdapter public class extends the FragmentPagerAdapter {

public ViewPagerAdapter(Activity, FragmentManager fragmentManager) {

@Public fragmentation check
item (int position) {
Bundle; switch (position)
case 0 : // For tablet 1
// Use of fragment for tablet 1
returns fragment1 ;
case 1 : // For tab 2
// Use fragment for tab 2
returns fragment2 ; case
2 : // For tab 3
// Use fragment for tab 3
gives fragment3; default
gives zero;

public int getCount() {
return 3; // count from tab

public CharSequence getPageTitle(int position) {
switch (position) {
case 0: // name for declaration Tab1
return Tab1;
case 1: // name for Tab2
return Tab2;
case 2 : // Header for Tab3returns Tab3;default:returns zero;}}}.

Solution No 6:

I had the same problem. This is how it worked for me.

Delete AppBarLayout layout_behavior so it is at the top. Set the layout behavior of the FrameLayout as app:[email protected]/appbar_scrolling_view_behavior to adjust the layout of the FrameLayout to that of the AppBarLayout. This way the content of your frame will scroll, but not the toolbar. The coordinate scheme is as follows

This is the XML format of your cutout, where scrolling does not affect the TabLayout format and the bottom line of the format.

I hope that helps somebody, thank you.

for more information –
Scrolling behaviour for Android appbars

Solution No 7:

This is not possible in a coordinate scheme. Therefore, use RelativeLayout and design your own layout in this software.

Solution No 8:

The best possible solution would be to create such a hierarchy.

Your layout allowed you to hide the toolbar during the interaction.

The other widgets must be placed in a fixed position.

Don’t forget to add

app:[email protected]/appbar_scrolling_view_behavior

the line above in the ViewGroup parent of your recording.

Let’s give an example of the approach I’m talking about.

So far, so good. Let’s take a look at the result.

Good luck!

Related Tags:

coordinatorlayout recyclerview scroll,collapsing toolbar'' android,coordinatorlayout nestedscrollview,collapsing toolbar with recyclerview android example,collapsing toolbar layout android example androidhive,appbar_scrolling_view_behavior not working,sticky button android,coordinatorlayout bottom button,codepath coordinatorlayout,android-coordinatorlayout scrollview,coordinator layout animation,coordinatorlayout androidx,coordinatorlayout pin to bottom,android-coordinatorlayout layout_below,coordinatorlayout anchor,set bottom in coordinatorlayout