Android UI Development

Source: Internet
Author: User

Today I learned a few things about Android UI development

  1. 6 large Layouts
  2. Styles and themes → custom styles, themes
  3. JUnit Unit Test
  4. About Toast Popup Features

    1. 6 large Layouts
    • Relativelayout
    • LinearLayout
    • Framelayout frame layout-commonly used in game development, player, scratch card
    • GridLayout Grid Layout-Calculators
    • Tablelayout
      • The number of rows is controlled by TableRow, and several TR have several lines
      • No need to specify Layout_width\height

Can be contacted by a simple registration, login page.

  2. Styles and Themes

Set style: style= "? android:attr/..."

Android:theme= "android:style/theme.dialog"----topic to add in Androidmanifest.xml.

    • Custom styles

Create a style file under Res/values → add <resources> root node → add a <style> node within the root node → declare one or more <item> in a node

You can also implement custom styles by inheriting other already defined styles with the parent function--Should this be easier?

3.Use of Toast

      • To add a statement in mainactivity:
        • Toast.maketext (Mainactivity.this, "This is the pop-up window content", Toast.LENGTH.LONG). Show ();

Summary: Today's important content is the use of 6 large layouts and toasts, both of which are more commonly used in development, and are often used in UI development.

Android UI Development

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.