开发者

How to start an activity Dialog

I have one activity which i am using for displaying Dialogs and as a normal layout.

So what i want to do is, sometimes i want to start activity as Th开发者_开发百科eme Dialog and some times using setContentView.

I can't use <activity android:theme="@android:style/Theme.Dialog"> in manifest file as it will always display activity as dialog.

So can we do it programmatic, i have also tried setTheme() method but it did't work.

Thanks,

PP.


If you know the dialog/fullscreen style before starting the activity, you could add 2 subclasses and declare them in your manifest. Then you start one or the other depending on the desired style.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜