I have a design of TabLayout
or TabHost
which ever you want to consider. Suppose this are the tabs -
Tab1 | Tab2 | Tab3 | Tab4 | Tab5
In this following action will take place -
Any idea about how to solve this? Thanks in advance!!
UPDATE: Solution I used
I tried this, but had to make lot of customization. So I stopped in middle as it was hell lot of work. So another way around I did is I put one more view over the TabLayout
on exactly same position as of Tab3 and on click of that View
I made the overlay view visible.
ViewPager
is not designed for this use case. Tabs automatically map to their corresponding element in the ViewPager
. But here's how I could see it kind of working.
TranslucentOverlayView
that has Visibility.GONE
which overlays your entire ViewPager
.fragment2
, and when tab3
is selected, make the TranslucentOverlayView
visible. This does mean that you'll have two separate instances of fragment2
side by side though.