Android的敬酒模糊 [英] Android toast blur

查看:130
本文介绍了Android的敬酒模糊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用吐司做一个弹出Android中,有没有当看到身后模糊窗口中的任何方式。我通常会使用:

I'm making a popup in Android using Toast, is there any way when shown to blur the window behind. I'd usually use:

getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,  
                     WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

但在这种情况下,我不知道如何去了解它...任何帮助将是巨大的,谢谢!

But in this case am not sure how to go about it... Any help would be great, thanks!

推荐答案

一个面包被设计成不显眼的,只出现了很短的时间使背景模糊将继续使用手机停止用户。从Android SDK:

A Toast is designed to be unobtrusive and only appears for a short time so blurring the background would stop the user from continuing to use the phone. From the Android SDK:

当视图被显示给用户,显示为在该应用程序的浮动图。它永远不会接收焦点。用户很可能会在输入别的东西的中间。我们的想法是尽可能不引人注目,但仍显示了用户,你希望他们看到的信息。两个例子是音量控制,以及简短的消息说,您的设置已保存。

When the view is shown to the user, appears as a floating view over the application. It will never receive focus. The user will probably be in the middle of typing something else. The idea is to be as unobtrusive as possible, while still showing the user the information you want them to see. Two examples are the volume control, and the brief message saying that your settings have been saved.

您将使用对话更好,如果你想保证用户的关注,那么你就应该能虚化背景:

You would be better using a Dialog if you want to guarantee the user's attention, you should then be able to blur the background:

http://developer.android.com/guide/topics/ui/ dialogs.html

这篇关于Android的敬酒模糊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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