views:

37

answers:

1

Hi all. 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 select any one of the file it show the alert with the file list background

+1  A: 

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" />
Ryan Conrad
I wish to show the alert with textbox . In that screen background i wish to display the phone screen(Before selection what screen is displayed that screen) I wish to display that alert "look like" default alert ask by the phone
Alex
I have updated my answer to show you exactly how you would set your theme so it looks like the alert dialog
Ryan Conrad
Thank you Ryan Conrad.It's working but in that alert it shows the package also(com.mytheme).
Alex
what do you mean it shows the package? in the title? try add android:label="my title" to the activity.
Ryan Conrad