我尝试开发像这样的图像左TabLayout。垂直Android TabLayout不垂直滚动
但问题是TabLayout
元素不是表演和垂直滚动。下面有我的代码也许我错过了一些东西:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/appBarLay"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLay"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="60dp"
android:layout_height="match_parent"
app:tabBackground="@drawable/tab_color_selector"
app:tabGravity="fill"
app:tabMode="scrollable" />
</android.support.design.widget.AppBarLayout>
</RelativeLayout>
Tablayout并不意味着垂直滚动,他们只进行水平滚动。 我认为你应该看看别的。 –
@PriyaSinghal,请告诉我什么是正确的方式。我在GitHub中找到了一些库,但有没有其他方法? –
使用可以使用ListView或RecyclerView与固定宽度,因为我认为你需要用选择的选项类型来填充屏幕...... 另外你试图制作的UI是在IOS的指导下进行的if可能会要求您的设计师将设计作为android的android指南。 –