开发者

lock and oscure android layout

I would like to do this... when I press 开发者_如何学Pythona button I would like to freeze and obscure my layout (like the effect of a modal window) but not the button.In few words when I press the button all is obsured but the button.


To do this, try creating a view that is entirely black, and add it to your base view taking up all the screen. Call bringChildToFront to bring the black view to the front, then call it again on the button to bring the button to the front. Set the black view to hidden (or alpha 0) until you need it, then when the button is pressed set it visible again. Shouldn't be too hard. You might want to make the entire screen a relative layout though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜