我正在尝试让我的android studio项目中的EditText
变得透明。我希望它看起来像这里的EditText
但是我的不是这样的,尽管我已经尝试过使用transparent
和ffffff
了,有人能帮我一下吗?我希望我的编辑文本背景看起来像我在图像中显示的那样。
发布于 2019-07-09 03:10:43
<EditText
android:layout_width="match_parent"
android:layout_margin="32dp"
android:layout_height="wrap_content"
android:hint="Username"
android:padding="16dp"
android:background="@drawable/edittext_bg" />
drawables文件夹中的edittext_bg.xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#80ffffff" />
<corners android:radius="5dp" />
</shape>
更改<solid android:color="#80ffffff" />
的颜色值以调整透明度。
发布于 2022-02-26 23:00:03
如果你想调整透明改变我给出的颜色#FF000000或#FFFFFFFF,你可以尝试这样做,你可以改变前两个字符( alpha )来改变透明度
https://stackoverflow.com/questions/56941056
复制相似问题