FloatingActionButton with BottomNavigationView

前端 未结 2 1850
执念已碎
执念已碎 2021-02-14 08:48

I cant position my FAB. It should be bottom right, but on top of the BottonNavigationView.

1) Can i achieve this without RelativeLayout inside coordinateLayout?

2条回答
  •  一个人的身影
    2021-02-14 09:40

    1. If you stick it in a linear layout and move the bottom nav outside of the coordinator view, it will be below it on the screen.

    2. You could do it this way, but I prefer using an empty fragment container which I put in the hosting activity, and then place the fragment inside of it in code.

      
      
          
      
          
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      

提交回复
热议问题