【发布时间】:2021-02-13 09:27:51
【问题描述】:
我尝试了多种方法来更改标签上显示的背景颜色,但我无法做到,如您所见,标签的背景是蓝色的,我想将其更改为另一种颜色。
我该怎么做?
代码
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputlogInPasword"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:background="@android:color/transparent"
app:boxBackgroundColor="@color/white"
app:errorEnabled="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLogInName">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/TextInputPasword"
android:inputType="numberDecimal" />
</com.google.android.material.textfield.TextInputLayout>
【问题讨论】:
标签: java android xml material-design android-textinputlayout