Skip to main content

Posts

Showing posts with the label android-alertdialog

Android dialog not showing on Honeycomb

I'm creating an AlertDialog in my Activity (which is set in Portraid mode in manifest file and in onCreate() ). When I'm testing my application on device there is no problem, but when I test in on Android Emulator 3.0 and I'm in landscape mode, in the beginning it's loading my application for a few milliseconds in landscape mode (I can see that in LogCat messages which I've added to my activity), enter in onResume() method of my activity and shows it on Portrait mode. But during this all I can see in my LogCat an error : Activity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@408512e0 that was originally added here I know why I receive this, but I don't know how exactly I can fix this. Here is how my Alert Dialog looks like : public AlertDialog createDialog(){ final CharSequence[] items = {getString(R.string.phone_memory)+" - "+memorysize+" "+getString(R.string.free_space)+" ", getString(R.st