If you want to replace an activity with a dialog box, you can set the theme attribute of the activity.

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.