你好,我正在制作一个Android应用程序,在其中需要在LinearLayout上放置一个透明视图。如屏幕截图所示,写有“04”的视图是透明的,但不完全透明。有什么办法可以使这个视图透明并带有一些颜色。
我创建了一个带圆角的LinearLayout,并设置了颜色。
我创建了一个带圆角的LinearLayout,并设置了颜色。
<LinearLayout
android:id="@+id/thirdLinearLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/secondRelativeLayout"
android:background="@drawable/clock_check_in_rounded_drawable"
android:orientation="horizontal" >
</LinearLayout>
clock_check_in_rounded_drawable.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/cyan_text_color" />
<corners android:radius="10dp" />
</shape>