I am working on a night light app. I want to apply brightness to a textView. I know how to set screen brightness but i am unable to figure how to set it on a textView.
Android- How to set brightness to textView?
1.4k views Asked by Ali Farhan At
2
There are 2 answers
0
On
You can use the alpha
property for TextView
in XML
:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:alpha="0.75"/>
Where Alpha
values are between 0 and 1 (0: is totally faded and 1: normal)
Here, the 0.75 alpha value will give 25% fading percentage to the TextView
A few things to try:
Try to use text shadow it will help you.
And agreed with androicode.
Thanks.