I want to make an app with TabView. TabView contains 3 activities. My Activity layout is a ScrollView and overlapping the tabs at bottom. I am attaching the image of screen with tab.
You have the Tabs and the Tab Content in the same FrameLayout, so when you put the content in, the tabs get covered. The TabWidget should go outside the FrameLayout and inside the LinearLayout, as it is not part of the tabcontent.
Steve Luke wrote:You have the Tabs and the Tab Content in the same FrameLayout, so when you put the content in, the tabs get covered. The TabWidget should go outside the FrameLayout and inside the LinearLayout, as it is not part of the tabcontent.
The margin trick works, but is a bit fragile, since you are relying on the height of the other component. It isn't 'the right way' to do it. The problem is that your frame layout uses a 'fill_parent' height. If the frame fills the parent, where is the room for the tabs? Instead, you should make the tabs 'wrap_content' like they are, and not specify a height for the frame layout: instead, give them a height of 0dp, and a weight of 1 (which means it will get 1 'unit' of leftover layout space: since it is the only component needing leftover space it gets it all):