Android help, about, author, help, and other prompt pages

Source: Internet
Author: User

In Android, the help, about, and author prompt pages are frequently used.

Pages like this:

This page can be designed through the alertdialog dialog box.

Design an aboutdialog class to inherit from alertdialog

 
Public class aboutdialog extends alertdialog {public aboutdialog (context) {super (context); final view = getlayoutinflater (). inflate (R. layout. about, null); setbutton (context. gettext (R. string. close), (onclicklistener) null); seticon (R. drawable. icon_about); settitle ("joke v1.0.0"); setview (View );}}

Corresponding XML file

1. layout file about. xml

<? XML version = "1.0" encoding = "UTF-8"?> <Framelayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content"> <scrollview xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent"> <textview Android: layout_height = "fill_parent" Android: layout_width = "fill_parent" Android: TEXT = "@ string/help_dialog_text" Android: padding = "6dip" Android: textcolor = "# ffffff"/> </scrollview> </framelayout>

2. Strings. xml

<String name = "help_dialog_text"> <I> author: Kong Shan is not empty </I> \ n <I> contact: ajie191@163.com </I> \ n <B> super joke --- collected more than 2000 types of jokes, let you laugh all day! You can also send jokes to your friends through text messages! </B> \ n <B> if you have any suggestions or feedback, contact the author at any time. </B> </string>

Then, callCodeThe dialog box is displayed.

 
New aboutdialog (this). Show ();
Related Article

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.