问题描述
发生错误时(例如,当用户输入无效的名称(插入符号,例如:@ $等)时),我想使textBox的笔触颜色为红色,我该怎么做,这是我的文本框代码
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/etFullNameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Full Name"
android:textColorHint="#b4ffff"
app:startIconTint="#b4ffff"
android:layout_margin="20dp"
app:startIconDrawable="@drawable/ic_person"
app:boxStrokeErrorColor="@color/color_on_secondary"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etFullName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)