Reputation: 121
If I have my layout's width and height set to wrap_content, it will take up about half the screen. If I set the layout's background to white, then only half the screen will be white while the other half remains on the default android black. Is there a way to set this other half, which has no layout in it, to also be white?
I want to keep the layout's width set to wrap_content because I'm including it in several activities where it will be used in the top half of the screen but the bottom half will vary from activity to activity.
Upvotes: 1
Views: 1454
Reputation: 17067
Well, your layout is contained within the decor view of your Activity
- accessible through the activitys Window
, like so:
getWindow().getDecorView().setBackgroundColor(Color.GREEN);
Upvotes: 3