If you want to replace an activity with a dialog box, you can set the theme attribute of the activity.
Android: theme = "@ Android: style/theme. Dialog"
2. Create a style. XML style file in the value folder and define the dialog style.
After searching for theme on the internet, Android comes with the following theme:
• Android: theme = "@ Android: style/theme. Dialog" shows an activity as a dialog box
• Android: theme = "@ Android: style/theme. notitlebar" does not display the application title bar
• Android: theme = "@ Android: style/theme. notitlebar. fullscreen": The application title bar is not displayed and displayed in full screen.
• Android: theme = "theme. Light" with a white background
• Android: theme = "theme. Light. notitlebar" the white background does not have a title bar.
• Android: theme = "theme. Light. notitlebar. fullscreen" white background, no title bar, full screen
• Android: theme = "theme. Black" background black
• Android: theme = "theme. Black. notitlebar" the black background does not have a title bar.
• Android: theme = "theme. Black. notitlebar. fullscreen" black background, no title bar, full screen
• Android: theme = "theme. Wallpaper" uses the system desktop as the background of the application
• Android: theme = "theme. wallpaper. notitlebar" uses the system desktop as the background of the application without a title bar.
• Android: theme = "theme. wallpaper. notitlebar. fullscreen" uses the system desktop as the background of the application, with no title bar and full screen
• Android: theme = "Translucent"
• Android: theme = "theme. translucent. notitlebar"
• Android: theme = "theme. translucent. notitlebar. fullscreen"
• Android: theme = "theme. Panel"
• Android: theme = "theme. Light. Panel"