android - 如果我把它放在 AppBarLayout 中,为什么 TextInputLayout 颜色不会改变?
问题描述
我试图改变 TextInputLayout 颜色并且它工作得很好,但是一旦我把它放在 AppBarLayout 中它就不会改变。
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="220dp"
>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:boxBackgroundColor="@color/white">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/weightText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/weight"
android:inputType="number" />
</com.google.android.material.textfield.TextInputLayout>
解决方案
推荐阅读
- c# - ViewModel中的Task导致的内存泄漏
- angular - 我在构建代理集角度站点时遇到问题
- strapi - STRAPI:如何从管理 ui 中的管理控制器获取数据
- android - Google 广告服务以错误结束构建
- git - sed:-e 表达式#1,字符 10:Windows 上 git 中“s”的未知选项
- android - Volley 只给我:onErrorResponse
- protractor - 我们可以使用茉莉花在量角器中建立规范文件之间的依赖关系吗?
- c# - Html.BeginCollectionItem 上的列表在提交 {get; 放;}
- r - 查找列表之间的基因重叠百分比
- javascript - 在崩溃节点中将大量数据写入文件