I am trying to set #ffffff
(white) background at 50% opacity to TextView.
I tried to use android:alpha=0.5
but it's also making text 50% transparent.
I need to set 50% opacity at white background.
I find one tutorial Here but don't understand that much.
Please provide me any reference. Thanks in Advance.
In your layout file just set the background of the TextView to "#8FFF"
<TextView
android:layout_width="..."
android:layout_height="..."
android:background="#8FFF"
/>
Here 8 is the alpha value, FFF are the RGB values respectivley. See here for more info on the background attribute
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With