<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Android: Blurring and dimming background windows from dialogs</title>
	<atom:link href="http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/</link>
	<description>Android, Linux, Python and stealthcopters</description>
	<lastBuildDate>Wed, 08 Feb 2012 11:08:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: SOurabh</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-6737</link>
		<dc:creator>SOurabh</dc:creator>
		<pubDate>Sat, 21 Jan 2012 09:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-6737</guid>
		<description>I want to do it on pop up  of POPUPWINDOW.I tried but it is not working</description>
		<content:encoded><![CDATA[<p>I want to do it on pop up  of POPUPWINDOW.I tried but it is not working</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-6610</link>
		<dc:creator>Praveen</dc:creator>
		<pubDate>Thu, 22 Dec 2011 12:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-6610</guid>
		<description>@BILL
You should create the alertdialog from the builder.
AlertDialog  a = eula.create();
a.show();
and then call a.getwindows().getattribues() on the alert dialog. 
Without showing the alert dialog get window will fail.</description>
		<content:encoded><![CDATA[<p>@BILL<br />
You should create the alertdialog from the builder.<br />
AlertDialog  a = eula.create();<br />
a.show();<br />
and then call a.getwindows().getattribues() on the alert dialog.<br />
Without showing the alert dialog get window will fail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-6586</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Fri, 16 Dec 2011 16:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-6586</guid>
		<description>I cannot get this to work.  Any help is greatly appreciated.  It states that &quot;The method getWindow() is undefined for the type AlertDialog.Builder&quot;.  Here&#039;s the code I&#039;m using:

    public static void showEula(final boolean accepted, final Activity activity) {
        AlertDialog.Builder eula = new AlertDialog.Builder(activity)
                .setTitle(R.string.eula_title)
                .setIcon(android.R.drawable.ic_dialog_info)
                .setMessage(activity.getString(R.raw.eula))
                .setCancelable(accepted);
                
        if (accepted) {
            // If they&#039;ve accepted the EULA allow, show an OK to dismiss.
            eula.setPositiveButton(android.R.string.ok,
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int which) {
                            dialog.dismiss();
                        }
                    });
        } else {
            // If they haven&#039;t accepted the EULA allow, show accept/decline buttons and exit on
            // decline.
            eula
                    .setPositiveButton(R.string.accept,
                            new android.content.DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog, int which) {
                                    setAcceptedEula(activity);
                                    dialog.dismiss();
                                }
                            })
                    .setNegativeButton(R.string.decline,
                            new android.content.DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog, int which) {
                                    dialog.cancel();
                                    activity.finish();
                                }
                            });
        }
        eula.show();
        WindowManager.LayoutParams lp = eula.getWindow().getAttributes();
        lp.dimAmount = 0.0F;
        eula.getWindow().setAttributes(lp);
        eula.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

    }</description>
		<content:encoded><![CDATA[<p>I cannot get this to work.  Any help is greatly appreciated.  It states that &#8220;The method getWindow() is undefined for the type AlertDialog.Builder&#8221;.  Here&#8217;s the code I&#8217;m using:</p>
<p>    public static void showEula(final boolean accepted, final Activity activity) {<br />
        AlertDialog.Builder eula = new AlertDialog.Builder(activity)<br />
                .setTitle(R.string.eula_title)<br />
                .setIcon(android.R.drawable.ic_dialog_info)<br />
                .setMessage(activity.getString(R.raw.eula))<br />
                .setCancelable(accepted);</p>
<p>        if (accepted) {<br />
            // If they&#8217;ve accepted the EULA allow, show an OK to dismiss.<br />
            eula.setPositiveButton(android.R.string.ok,<br />
                    new DialogInterface.OnClickListener() {<br />
                        public void onClick(DialogInterface dialog, int which) {<br />
                            dialog.dismiss();<br />
                        }<br />
                    });<br />
        } else {<br />
            // If they haven&#8217;t accepted the EULA allow, show accept/decline buttons and exit on<br />
            // decline.<br />
            eula<br />
                    .setPositiveButton(R.string.accept,<br />
                            new android.content.DialogInterface.OnClickListener() {<br />
                                public void onClick(DialogInterface dialog, int which) {<br />
                                    setAcceptedEula(activity);<br />
                                    dialog.dismiss();<br />
                                }<br />
                            })<br />
                    .setNegativeButton(R.string.decline,<br />
                            new android.content.DialogInterface.OnClickListener() {<br />
                                public void onClick(DialogInterface dialog, int which) {<br />
                                    dialog.cancel();<br />
                                    activity.finish();<br />
                                }<br />
                            });<br />
        }<br />
        eula.show();<br />
        WindowManager.LayoutParams lp = eula.getWindow().getAttributes();<br />
        lp.dimAmount = 0.0F;<br />
        eula.getWindow().setAttributes(lp);<br />
        eula.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);</p>
<p>    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leonnib4</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-4686</link>
		<dc:creator>leonnib4</dc:creator>
		<pubDate>Thu, 03 Feb 2011 21:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-4686</guid>
		<description>Thank you very very much for such precise and fully-working piece of code.

I also searched for that for minutes and your site just answered me in 4 lines and 5 secondes :)

Thx</description>
		<content:encoded><![CDATA[<p>Thank you very very much for such precise and fully-working piece of code.</p>
<p>I also searched for that for minutes and your site just answered me in 4 lines and 5 secondes <img src='http://www.stealthcopter.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mcveat</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-4595</link>
		<dc:creator>mcveat</dc:creator>
		<pubDate>Thu, 13 Jan 2011 20:09:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-4595</guid>
		<description>Thanks. You helped very much.</description>
		<content:encoded><![CDATA[<p>Thanks. You helped very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sat</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-4470</link>
		<dc:creator>sat</dc:creator>
		<pubDate>Mon, 13 Dec 2010 09:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-4470</guid>
		<description>Valuable information , worked perfectly for the alertDialog.</description>
		<content:encoded><![CDATA[<p>Valuable information , worked perfectly for the alertDialog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-4384</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Wed, 01 Dec 2010 00:11:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-4384</guid>
		<description>setContentView(R.layout.main);
mDialog = new ProgressDialog(this); 	mDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
mDialog.setCancelable(true);
    	
mDialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
    			
WindowManager.LayoutParams lp = mDialog.getWindow().getAttributes();
lp.dimAmount = 0.0f;
mDialog.getWindow().setAttributes(lp);

Doesn&#039;t really work... I even tried to modify the styles.xml file.  Please help.</description>
		<content:encoded><![CDATA[<p>setContentView(R.layout.main);<br />
mDialog = new ProgressDialog(this); 	mDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);<br />
mDialog.setCancelable(true);</p>
<p>mDialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);</p>
<p>WindowManager.LayoutParams lp = mDialog.getWindow().getAttributes();<br />
lp.dimAmount = 0.0f;<br />
mDialog.getWindow().setAttributes(lp);</p>
<p>Doesn&#8217;t really work&#8230; I even tried to modify the styles.xml file.  Please help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cristian</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-3523</link>
		<dc:creator>Cristian</dc:creator>
		<pubDate>Fri, 13 Aug 2010 13:40:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-3523</guid>
		<description>It worked like a charmed!

Thank you so much!</description>
		<content:encoded><![CDATA[<p>It worked like a charmed!</p>
<p>Thank you so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-3515</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 12 Aug 2010 01:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-3515</guid>
		<description>This helped out immensely.

I tried to override the AlertDialog theme originally and was not having very much success.</description>
		<content:encoded><![CDATA[<p>This helped out immensely.</p>
<p>I tried to override the AlertDialog theme originally and was not having very much success.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-919</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Tue, 06 Apr 2010 04:35:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-919</guid>
		<description>Thanks! People don&#039;t waste 3 hours like I did. You have to SHOW the dialog first or in my case with a custom dialog setContentView() first BEFORE, like so. Or it WONT work.

SkillMenuView skillMenuView = new SkillMenuView(this);		
setContentView(skillMenuView);
		
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.dimAmount = 0.0F;
lp.screenBrightness = 1.0F;
getWindow().setAttributes(lp);</description>
		<content:encoded><![CDATA[<p>Thanks! People don&#8217;t waste 3 hours like I did. You have to SHOW the dialog first or in my case with a custom dialog setContentView() first BEFORE, like so. Or it WONT work.</p>
<p>SkillMenuView skillMenuView = new SkillMenuView(this);<br />
setContentView(skillMenuView);</p>
<p>WindowManager.LayoutParams lp = getWindow().getAttributes();<br />
lp.dimAmount = 0.0F;<br />
lp.screenBrightness = 1.0F;<br />
getWindow().setAttributes(lp);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mat</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-131</link>
		<dc:creator>mat</dc:creator>
		<pubDate>Fri, 29 Jan 2010 01:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-131</guid>
		<description>I haven&#039;t tested it but I think this is how you would do it:

&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;
WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
lp.alpha=0.5f;
dialog.getWindow().setAttributes(lp);
&lt;/pre&gt;

By setting alpha to 0.5 it should make the window 50% transparent. Try it out let me know how it goes...</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t tested it but I think this is how you would do it:</p>
<pre name="code" class="java">
WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
lp.alpha=0.5f;
dialog.getWindow().setAttributes(lp);
</pre>
<p>By setting alpha to 0.5 it should make the window 50% transparent. Try it out let me know how it goes&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jack</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-124</link>
		<dc:creator>jack</dc:creator>
		<pubDate>Thu, 28 Jan 2010 06:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-124</guid>
		<description>Is it possible that removing blur, dimming of the background using your technique ?
I just want a transparent background window of a dialog.</description>
		<content:encoded><![CDATA[<p>Is it possible that removing blur, dimming of the background using your technique ?<br />
I just want a transparent background window of a dialog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ravi</title>
		<link>http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/comment-page-1/#comment-116</link>
		<dc:creator>Ravi</dc:creator>
		<pubDate>Wed, 27 Jan 2010 03:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=463#comment-116</guid>
		<description>One word Thank You. I was trying to do this - your site answered in 5 seconds. Thank you Thank you.</description>
		<content:encoded><![CDATA[<p>One word Thank You. I was trying to do this &#8211; your site answered in 5 seconds. Thank you Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.605 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-09 05:37:13 -->

