如何让活动,而不是覆盖全屏幕 [英] How to make Activity, not covering full screen

查看:126
本文介绍了如何让活动,而不是覆盖全屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的行为采取屏幕如小面积敬酒不包括所有的屏幕,它只是显示了其他的东西,内容其余部分可以看出敬酒后面。但是,这是一个对话,我想上面其他的事情,例如要显示我的屏幕上面的主屏幕。下面是想法,在我的脑海里。

I want my activity to take smaller area of the screen e.g. toast doesn't cover all of the screen, it is just shown over other things and rest of the contents can be seen behind the toast. But it's a dialog, and I want my screen to be shown above other things e.g. above Home Screen. Below is the idea that is in my mind.

请,引导我,如果它甚至有可能。如果可能的话再告诉我正确的道路。
谢谢你。

Kindly, guide me if it is even possible. If possible then show me the right path.
Thanks.

推荐答案

让您的活动主题为半透明。 添加下面一行在您的清单对这项活动:

make your activity theme as translucent. add the following line in your manifest against that activity:

android:theme="@android:style/Theme.Translucent"

这样您就可以看到背景的东西视图添加到的LinearLayout与机器人:alignParentBottom = TRUE

这篇关于如何让活动,而不是覆盖全屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆