alexa

How to use Coordinatorlayout with Linearlayout in android studio ?

How to use Coordinatorlayout with Linearlayout in android studio ?

I found a simple trick to solve the problem. Inside FragmentContainerView I'm showing a specific fragment and there is NestedScrollView inside the fragment.

I gave these attributes to the NestedScrollView

 android:clipToPadding="false"
android:paddingBottom="Should be the same height of BottomNavigationView" 

Now the content inside FragmentContainerView will be top of BottomNavigationView and never will touch BottomNavigationView.

The disadvantages of this way

  • It will leave extra space in the bottom but mostly BottomNavigationView will cover it
  • If you give background color for NestedScrollView, The color will touch BottomNavigationView

But at least it is working as I want.


279 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online

Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry