Thursday, December 16, 2010

Window fluctuation in case of AlertDialog

Hi Guys,
Today I was facing following problem
Problem:
In Gallery,if you view any image and in that if you select Menu-> Details.
At the time of display image it shows annunciator bar for a moment and just disappear. I dont want this. After analyzing this I found that this is not visible when the items in the dialog is limited to 2-3 items. So suggest me the solution. It is in the Google Froyo code.
So here is the solution for it
Solution:
 AlertDialog alert = builder.create();
Window dwindow = alert.getWindow(); 

dwindow.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,   WindowManager.LayoutParams.FLAG_FULLSCREEN);
alert.show();
Hope this will be useful for you.

Tuesday, December 14, 2010

Android : Pop-up Disappear when configuration changed

If you are facing this problem in your android application, then here is the solution
1. Override onConfigurationChanged() method in your activity.
2. And also add android:configChanges=”orientation|keyboardHidden” in the activity, in AndroidManifest file of that application.
And thats it. Your problem will be resolved.