Android Learning Series (5)-simple model of App Layout

Source: Internet
Author: User

The progress of human science and technology comes from exploration. The exploration comes from the original discovery. Of course, the App layout is not so advanced. This article is just a summary.
This article is a must-have knowledge for android Developers. It is specially compiled and summarized for everyone. It is not perfect but useful.

Android interface development has a lot of similar or similar la S. In addition, looking at the Android application interface, there is always no way to escape those familiar structures.
Today, based on my experience, I have analyzed common la S and summarized several simple models. These models are generally the best layout for solving their corresponding layout problems, it depends on the situation.
Due to the limitation of my work, I cannot study the layout of the arms. I can only consider the layout I encountered during my work.
Another point I want to emphasize is that these layout principles are simple and flexible.

Model 1: horizontal three-column sitting

Note: There are three horizontal columns, with the buttons "return" and "Submit" on both sides. The buttons must be centered in the middle and generally contain the title name.
It seems that the background of the title contains two beautiful buttons.
Method: FrameLayout layout is used.
Layout code:

Html # viewSource "commandName =" viewSource "highlighterId =" highlighter_174070 "> view sourceprint?
01 <! -- This layout:
02 The disadvantage is that the title can only contain a few words, and when there are more words, it will open and overlap with the buttons on both sides.
03 The advantage is that the Code is concise. -->
04 <?xml version="1.0" encoding="utf-8"?>
05 <FrameLayout xmlns:android=""
06     android:layout_width="fill_parent"
07     android:layout_height="wrap_content"
08     android:background="@drawable/layout01_bg"
09     android:paddingLeft="10dip"
10     android:paddingRight="10dip"
11     >
12     <Button android:layout_gravity="left|center_vertical"
13         android:layout_width="wrap_content"
14         android:layout_height="wrap_content"
15         android:background="@drawable/layout01_tool"
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: 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.