Dan*_*gui 5 material-components
我是 android material-components 的新手,我第一次尝试了带有 FilledBox 样式的基本 TextInputLayout,默认情况下背景看起来像半透明,根据我们的设计,我需要将其更改为纯白色。但是我试过app:boxBackgroundColor="#ffffff",然后文字和文字提示就看不见了!然后我尝试了 app:boxBackgroundColor="#80ffffff" 我可以看到它们是某种透明的。你知道为什么?我只想要纯白色的背景,其他的保持不变。
提前致谢!
<com.google.android.material.textfield.TextInputLayout
style=".MaterialComponents.TextInputLayout.FilledBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="120dp"
app:boxBackgroundColor="#ffffff">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#ff000000"
android:textColorHint="#ff0000"
android:hint="Location"/>
</com.google.android.material.textfield.TextInputLayout>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3582 次 |
| 最近记录: |