I have created custom bottom navigation view in separate layout.
What I want is to achieve this:
Instead of this (in red is the bottom navigation layout border):
Is there a tricky way to achieve this?
On
It would help to see your layout file, but you should be able to easily do that by putting both of the views in a Relative Layout and setting the footer to the bottom of the layout and making the fragment match the size of the relative layout container. That will make the footer overlap the fragment. And then just add an offset to the bottom padding to what you want in the fragment view
On
I do not have your layout code. If your Fragment is in constantlayout then have your bottom of Fragment to constrained to bottom of the parent. Give your Fragment bottom margin that equals the height of your bottom navigation view. And finally, give some elevation to the bottom navigation view. That's should work.
Yes:
Layout scheme:
BottomNavViewCoordinatorLayoutof the BottomLayout should have a transparent background in order to show the fragment on the backgroundThe downside is that the touch events on the intersection area of the BottomLayout with the Fragment will be intercepted by the BottomLayout.