TabLayout提供了一个水平的布局方式显示,TabItem是TabLayout显示的物件。
implementation 'com.google.android.material:material:1.1.0'
<com.google.android.material.tabs.TabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tablayout"
app:tabRippleColor="@color/colorAccent"
app:tabIndicatorColor="@color/colorPrimary">
...
</com.google.android.material.tabs.TabLayout>
app:tabRippleColor=
tabItem点下去会呈现扩散的颜色
app:tabIndicatorColor=
tabItem下方指示条的颜色
tabTextColor=
tab字体的颜色
app:tabMode=
有以下2种模式TabItem是TabLayout里可以点选的物件
<com.google.android.material.tabs.TabItem
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="显示"/>
<com.google.android.material.tabs.TabItem
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="新增"/>
<com.google.android.material.tabs.TabItem
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="修改"/>
成果:
明天会加上viewPager。
状况描述: esxi server 7.0.0 上面运行 vSphere Client 7.0.0 ...
接下来介绍比较运算值,也是用程序码跟注解来呈现 结果会以布林true跟false显示 ...
究竟是谁有问题呢? 答案是... ... ... 最右边的这组电路有问题! 它的问题是这颗电阻根本没...
介绍 只要把Widget想像成一块块的乐高积木或是部件, 当你要建造一台新阿姆斯特朗旋风喷射阿姆斯特...
前言 这是个人很久以前在闲暇之余写的一个专案,技术多为爬虫观念,後来整合 GitHub Action...