如何调暗当前活动?
有没有办法在调用新活动时使当前活动变暗?因为新活动应该高于先前的活动。我的新活动是画廊。当单击上一个活动中的完成按钮时,就会出现该情况。所以我希望这个画廊放置在之前的活动之上
Is there a way to dim the Current activity when calling the new activity? as in the new activity should be above the previous activity. The new activity that i have is a gallery. It comes when the finish button in the previous activity is clicked. So i want this gallery to be placed above the previous activity
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试将画廊活动的背景设置为透明颜色。您可能需要创建自定义主题,更多详细信息可以在此处找到:http:// /developer.android.com/guide/topics/ui/themes.html
这可能是完全透明的,所以不完全是你想要的。但是,例如:
Try setting the background of your gallery Activity to a transparent color. You might need to create a custom theme and more details can be found here: http://developer.android.com/guide/topics/ui/themes.html
This is probably going to be completely transparent, so not quite what you want. But, for example:
我怀疑您是否可以将两个活动叠加在一起。但是,为了实现您提到的效果,您可以使用自定义对话框在主画廊活动中弹出,然后使用窗口管理器将屏幕的其余部分设置为模糊。有关示例,您可以查看: http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/
I doubt if you could overlay two activities on top of each other. However, in order to achieve the effect that you mentioned, you could use a customized dialog to popup within your main gallery activity, and then set the rest of the screen as blurred, with the use of window manager. For an example of this, you can see: http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/