we can apply a dialog theme to an activity so that it is displayed as a floating dialog.
To apply a dialog theme to an activity, just modify the <Activity> element in the AndroidManifest.xml file by adding the android:theme attribute(android:theme="@android:style/Theme.Dialog") to the Activity.
In Manifest file just add one simple attribute to show activity as a dialog.
<activity
android:label="@string/app_name"
android:name=".Activity"
android:theme="@android:style/Theme.Dialog" />
Then here we got one doubt how to close this activity dialog?
solution is just call finish( ) method to close the activity dialog.
To apply a dialog theme to an activity, just modify the <Activity> element in the AndroidManifest.xml file by adding the android:theme attribute(android:theme="@android:style/Theme.Dialog") to the Activity.
In Manifest file just add one simple attribute to show activity as a dialog.
<activity
android:label="@string/app_name"
android:name=".Activity"
android:theme="@android:style/Theme.Dialog" />
Then here we got one doubt how to close this activity dialog?
solution is just call finish( ) method to close the activity dialog.
No comments:
Post a Comment