Android: Change background color outside of the layout -
if have layout's width , height set wrap_content, take half screen. if set layout's background white, half screen white while other half remains on default android black. there way set other half, has no layout in it, white?
i want keep layout's width set wrap_content because i'm including in several activities used in top half of screen bottom half vary activity activity.
well, layout contained within decor view of activity
- accessible through activitys window
, so:
getwindow().getdecorview().setbackgroundcolor(color.green);
Comments
Post a Comment