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.
Asked
Active
Viewed 1,370 times
2 Answers
0
A few things to try:
Try to use text shadow it will help you.
- Look on a real device, not in Eclipse "Graphical layout" which does not support text shadow.
- Decrease the shadow radius to 1. The larger the radius, the more blurred the shadow is.
- Check if the style file you wrote in in the main "values" directory or under values-?dpi. Maybe your device dpi does not target your style file
And agreed with androicode.
Thanks.

Community
- 1
- 1

Pankaj Sakariya
- 77
- 9
0
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

blueware
- 5,205
- 1
- 40
- 60