android - How to create scrollable tabs? -


i working create scroll able tabs, please me out, using below code, not work me

   <tabhost      xmlns:android="http://schemas.android.com/apk/res/android"      android:id="@android:id/tabhost"      android:layout_width="fill_parent"      android:layout_height="fill_parent"> <linearlayout           android:orientation="vertical"           android:layout_width="fill_parent"           android:layout_height="fill_parent"> <horizontalscrollview                android:layout_width="fill_parent"                android:layout_height="wrap_content">                 <tabwidget                     android:id="@android:id/tabs"                    android:layout_width="fill_parent"                     android:layout_height="wrap_content" />  </horizontalscrollview> <framelayout                android:id="@android:id/tabcontent"                android:layout_width="fill_parent"                android:layout_height="fill_parent"                android:padding="5dp" /> </linearlayout> </tabhost> 

please let me know specific answers

this works version 2.2+

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android1="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:gravity="center_horizontal"     android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android">      <tabhost         android1:id="@android:id/tabhost"         android1:layout_width="match_parent"         android1:layout_height="match_parent" >         <framelayout android:layout_width="fill_parent" android:layout_height="fill_parent">             <linearlayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">                 <horizontalscrollview android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:fillviewport="true">                     <tabwidget android:id="@android:id/tabs"                          android:layout_width="fill_parent"                          android:layout_height="wrap_content"                          android:layout_weight="0.0"                          android:background="@drawable/tab_bg_unselected"/>                 </horizontalscrollview>                 <relativelayout android:layout_width="fill_parent" android:layout_height="fill_parent">                     <framelayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignparenttop="true" />                 </relativelayout>             </linearlayout>         </framelayout>     </tabhost> 


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -