gpt4 book ai didi

java - Android:如何禁用选项卡选择时的默认弹出 TabLayout 动画

转载 作者:行者123 更新时间:2023-12-01 19:52:00 27 4
gpt4 key购买 nike

那么,有没有办法在选择选项卡时禁用动画?我想删除阴影/高程。我们的想法是保持简单。

enter image description here

这是我的布局应用程序条形码:

<android.support.design.widget.AppBarLayout
android:id="@+id/appbar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWhite"
app:elevation="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">

<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWhite"
app:tabIndicatorColor="@android:color/transparent"
app:tabIndicatorHeight="0dp">

<android.support.design.widget.TabItem
android:id="@+id/tabItem0"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout="@layout/tab_translator"
android:icon="@drawable/ic_translator"/>

<android.support.design.widget.TabItem
android:id="@+id/tabItem1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout="@layout/tab_history"
android:icon="@drawable/ic_history"/>

<android.support.design.widget.TabItem
android:id="@+id/tabItem2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout="@layout/tab_dialog"
android:icon="@drawable/ic_dialog"/>

</android.support.design.widget.TabLayout>

</android.support.design.widget.AppBarLayout>

任何帮助将不胜感激。

最佳答案

在您的 TabLayout 中添加可以使用的 app:tabBackground="@color/white"

关于java - Android:如何禁用选项卡选择时的默认弹出 TabLayout 动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51080086/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com