android - Adjusting layout sizes, height and with inside fragment classes -
we trying have tabwidget right of screen in vertical direction. have problem resizing tabs length of layout containing tabs.
also cant find way sizes views , layouts inside fragment code.
xml , graphical layout view attached below.
<?xml version="1.0" encoding="utf-8"?> <tabhost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="match_parent" > <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <framelayout android:id="@android:id/tabcontent" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" > <linearlayout android:id="@+id/all" android:layout_width="match_parent" android:layout_height="match_parent" > <listview android:id="@+id/listview1" android:layout_width="match_parent" android:layout_height="match_parent" android:cliptopadding="false" > </listview> </linearlayout> <linearlayout android:id="@+id/record" android:layout_width="match_parent" android:layout_height="match_parent" > <textview android:id="@+id/tabtxt2" android:layout_width="wrap_content" android:layout_height="80dp" android:layout_gravity="center_horizontal" android:text="tab 2 content jehaw!" > </textview> <imageview android:id="@+id/journal_image" android:contentdescription="journal" android:src="@drawable/ic_launcher" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|center_vertical" > </imageview> </linearlayout> <linearlayout android:id="@+id/history" android:layout_width="match_parent" android:layout_height="match_parent" > <textview android:id="@+id/tabtxt3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="tab 3 content jehaw!" > </textview> </linearlayout> </framelayout> <linearlayout android:id="@+id/tabs_layout" android:layout_width="100dip" android:layout_height="match_parent" android:layout_weight="1" > <tabwidget android:id="@android:id/tabs" android:layout_height="match_parent" android:layout_width="wrap_content" android:divider="@color/green" android:rotation="90" android:layout_gravity="center_vertical" > </tabwidget> </linearlayout> </linearlayout> </tabhost>
size of tabs should stretch fill white area(layout) in vertical direction
tabwidget has hardcoded setorientation(linearlayout.horizontal); in tabwidget init() method , tabhost not support orientation attribute , tabs can used horizontally.
Comments
Post a Comment