【发布时间】:2020-05-21 13:37:06
【问题描述】:
TextInputLayoutunfocus如何改变边框和颜色?
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_height="wrap_content"
app:boxStrokeWidth="4dp"
app:boxStrokeColor="@color/colorPrimary"
app:layout_constraintTop_toBottomOf="@id/a">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:hint="@string/app_name"
android:textColorHint="@color/colorPrimary"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
我试试:
app:boxStrokeWidth="4dp"
app:boxStrokeColor="@color/colorPrimary"
但是,在散焦状态下不起作用
【问题讨论】:
标签: android android-xml android-textinputlayout material-components-android material-components