On Mar 13, 7:45 pm, mot12 <martin.hu...@gmail.com> wrote:
> Hi,
>
> I have a root view (LinearLayout) and a bunch of views placed on top
> of it. Now, I would like to change the brightness of all views, let's
> say to 50%.
>
> Instead of changing the color of each view individually, it would be
> so much nicer if I could just place a view on top of all views,
> covering the whole screen and acting like a filter. If this top-view
> is black, I can control the brightness of all the views underneath it
> by adjusting the alpha value.
>
> For this to work, I would need to tell Android to render the root view
> in front of all the other views but I can't find a way to do this. Any
> ideas?
>
> The actual reason for this weird request is that I want to be able to
> dim the screen. There's some functionality to turn the brightness of
> the screen down but the lowest setting is still too bright. The only
> way to get the views darker seems to be to change the colors of the
> views themselves. Rather than changing 50 items, it would be great to
> put just one view on top of the whole tree, like a pair of sunglasses.
>
> Or is there a better way?
>
> thanks for your time,
> Martin


you can place your LinearLayout inside FrameLayout and add also simple
View which android:background would act as your filter:

FrameLayout
--View
--LinearLayout
----your control1
----your control2
----your controlN

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to