Reputation: 16532
I have an activity defined like this
<activity android:name=".queue.ItemDetailActivity"
android:theme="@android:style/Theme.Dialog"></activity>
This activity implements runnable and shows a progress bar while data is retrieved from the server. I would like to have the dialog invisible until the data is loaded. Is there a way for the activity to start invisible and then later use setVisible(true);
to make it appear?
Upvotes: 6
Views: 8541
Reputation: 71
Try this style for the activity.
<style name="Invisible" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
Upvotes: 7