How to add space between Textview and Tabbedview in android -
i have got relative layout, in have placed 2 textviews, 1 image view & tabbed view. have got tabbed view @ bottom. add space between tabview imageview. how achieve it?.
here source code
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="6dip"> <imageview android:id="@+id/icon" android:layout_width="100dip" android:layout_height="100dip" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:layout_marginright="6dip" android:scaletype="center" android:src="@drawable/ic_launcher"/> <textview android:text="hello world" android:id="@+id/servicename" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleline="true" android:focusable="true" android:focusableintouchmode="true" android:freezestext="true"></textview> <textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignbottom="@+id/icon" android:layout_alignleft="@+id/servicename" android:gravity="center_vertical" android:text="123456789" android:textsize="30dip" /> <tabhost android:id="@android:id/tabhost" android:layout_below="@+id/icon" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <tabwidget android:id="@android:id/tabs" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="0"/> <framelayout android:id="@android:id/tabcontent" android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="0"/> <framelayout android:id="@+android:id/realtabcontent" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"/> </linearlayout> </tabhost> </relativelayout>
try this
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="6dip"> <imageview android:id="@+id/icon" android:layout_width="100dip" android:layout_height="100dip" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:layout_marginright="6dip" android:scaletype="center" android:src="@drawable/ic_launcher"/> <textview android:text="hello world" android:id="@+id/servicename" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleline="true" android:focusable="true" android:focusableintouchmode="true" android:freezestext="true"></textview> <textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignbottom="@+id/icon" android:layout_alignleft="@+id/servicename" android:gravity="center_vertical" android:text="123456789" android:textsize="30dip" /> <tabhost android:id="@android:id/tabhost" android:layout_below="@+id/icon" android:layout_marginleft="6dip" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <tabwidget android:id="@android:id/tabs" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="0"/> <framelayout android:id="@android:id/tabcontent" android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="0"/> <framelayout android:id="@+android:id/realtabcontent" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"/> </linearlayout> </tabhost>
Comments
Post a Comment