项目中要用到VerticalTab,查阅资料得以解决,记录下。
首先要继承TabWidget然后再xml引用自定义TabWidget。
xml文件:
<UIVerticalTabWidget
android:id="@android:id/tabs"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="top|right"
android:paddingTop="5dp"
android:background="@drawable/tabwidget_repeat_bg"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/transparent"
>
<FrameLayout
android:id="@+id/tab_1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/transparent"/>