开发者

How to display alert without background and application title?

I am new to android. I just create one application it download the file from the mail attachment. When we try to open a file my application will give an alert dialog. But it gives the alert, behind that it shows a black background with my application title bar. I don’t want to display that background and title. I wish to display the alert only. Is there any possibility to do like this?

note: Alert with no background means i wish to show like a mobile alert.In the download folder there will be a list of downloaded files if i s开发者_如何学运维elect any one of the file it show the alert with the file list background


You have to set android:theme in your Android Manifest to change the type of "window" you want to display.

In your AndroidManifest.xml you will set the android:theme to Theme.Dialog like the following:

<activity android:name=".MyActivity" android:theme="@android:style/Theme.Dialog" />
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜