Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transparent View over Linear Layout in Android

Hello I am making an android application where I need to place a transparent view over a LinearLayout. See in the screenshot View where "04" is written is transparent but not completely. Any idea to make this view transparent with some color.

enter image description here

I made the LinearLayout with rounded and set the color also.

<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>
like image 690
N Sharma Avatar asked Dec 20 '22 14:12

N Sharma


1 Answers

Before I answer your question, lets see about the html color codes:

  • Black: #000000
  • Translucent Black: ##55000000
  • Transparent Black: ##FF000000

    SO here the first two digits specify the transparency of the color.You can have values from 00 to FF for complete transparency.

like image 60
amalBit Avatar answered Dec 27 '22 09:12

amalBit