Android Tablayout+viewpager2的功能是显示位于页面上方悬浮的透明顶部栏
发布时间
阅读量:
阅读量
基于Tablayout与Viewpager2构建悬浮于页面上方的透明顶部导航栏
背景:
通过Tablayout与Viewpager2组合实现顶部导航功能,多数技术博客采用的布局方式及
<LinearLayout 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:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="48dp" //菜单高度
android:background="#1FBCD2" //菜单条的背景
app:tabIndicatorColor="#ff
全部评论 (0)
还没有任何评论哟~
