Domanda

I have an alert dialog.

I can show it as a part of 2 activites.

Activity A - Normal Class Extending Activity.

Activity B - It is an empty activity. It also has android:theme="@android:style/Theme.Dialog" mentioned in it manifest declaration.

If I am showing it as a part of A it is working perfectly.

But if I am showing it as a part of B it not showing up at all. All I am see is a blank activity with "Application Name" in the center of the screen.

Any ideas what the issue might be? Also, the dialog has a linear layout shown in it. If I am using linearLayout.setOrientation(LinearLayout.VERTICAL) while showing the dialog would there be any issues if I am using it in a tablet?

È stato utile?

Soluzione

You have to mention the following in Manifest For all activities in project

 android:configChanges="keyboardHidden|screenSize|orientation"
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top