android - HorizonatalScrollView on TabWidged "steals" space -


I have a tab activation with custom tab widgets. I want to add more than 5 tabs, unlike the menubar, which are dynamically Adds a "more" button, the size of the tabs is changed and looks poorly. That's why my first attempt was to wrap my tabwidts in a horizontal sculview. The problem is, that I have list list tabs in the form of content and its last item is hidden behind my tabwidts. This is the layout for my tabviv

   Android: Android: Android: layout_width = "fail_parent" Android: layout_heat = "wrap-content" Android: fillViewport = "true" Android: scrollbars = "none" Android: layout_linesparrebottom = "true" & gt; & Lt; TabWidget Android: id = "@Android: ID / Tabs" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" android: layout_gravity = "center" /> & Lt; / HorizontalScrollView & gt; & Lt; / RelativeLayout & gt; & Lt; / TabHost & gt; & Lt; / LinearLayout & gt;   

Am I doing something wrong in my layout? Are there better ways to apply more than 4 tabs? As long as I can see 4 tabs good with my Nexus-S, I am thinking that they are already ugly on a wild fire. Any idea appreciated

Try it out It worked for me:

Code:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout Android: layout_width = "fill_parent" android: layout_height = "fill_parent" xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & Lt; TabHost android: layout_weight = "1" android: id = "@ android: id / tabhost" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" & gt; & Lt; LinearLayout Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" android: orientation = "vertical" & gt; & Lt; HorizontalScrollView Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" & gt; & Lt; LinearLayout Android: layout_height = "fill_parent" Android: Orientation = "horizontal" Android: layout_width = "fill_parent" & gt; & Lt; TabWidget Android: layout_height = "wrap_content" android: id = "@ android: id / tab" android: isScrollContainer = "true" Android: layout_width = "fill_parent" Android: scrollbar = "horizontal" & gt; & Lt; / TabWidget & gt; & Lt; / LinearLayout & gt; & Lt; / HorizontalScrollView & gt; & Lt; FrameLayout Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" android: id = "@ android: id / tabcontent" & gt; & Lt; LinearLayout Android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: id = "@ + id / tab1" & gt; & Gt; / Linear layout & gt; & Lt; LinearLayout Android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: id = "@ + id / tab2" & gt; & Lt; / LinearLayout & gt; & Lt; LinearLayout Android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: id = "@ + id / tab3" & gt; & Lt; / LinearLayout & gt; & Lt; LinearLayout Android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: id = "@ + id / tab4" & gt; & Lt; / LinearLayout & gt; & Lt; LinearLayout Android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: id = "@ + id / tab5" & gt; & Lt; / LinearLayout & gt; & Lt; / FrameLayout & gt; & Lt; / LinearLayout & gt; & Lt; / TabHost & gt; & Lt; / LinearLayout & gt;    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -