[Android] Interface Division

Source: Internet
Author: User

1. Unified interface Management

1.1 uses an activity to manage all of the app's interfaces

1.1.1 Understand the relationship between Activity,Window and View

1.1.2 Avoid problems caused by too much Activity,

Example: Exit the application completely, change the inventory file frequently, etc.

Unified interface style, reduce user's learning cost

2. Interface partitioning

2.1 Display, a preliminary division of the interface

2.2 Interface Management implementation

2.2.1 Extract Header Management

2.2.2 extract bottom navigation management

2.2.3 Extract Partial management of intermediate content, set up the content partial switching mechanism

2.2.4 Perfecting user prompting mechanism

2.3 Preparatory work

2.3.1 Importing resource files such as pictures and text

You can use the project as a libirary Library

2.3.2 naming rules Description

Prevent name collisions

2.4 Setting up a layout file for Activity

2.4.1 Create three titles partial layouts, two navigation parts layouts

2.4.2 Use <include/> include layout file in main layout file

<?XML version= "1.0" encoding= "Utf-8"?><Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent" >    <!--Title Section -    <includeAndroid:id= "@+id/il_title"Android:layout_width= "Match_parent"Android:layout_height= "20DP"Android:layout_alignparenttop= "true"Layout= "@layout/il_title" />    <!--Navigation Section -    <includeAndroid:id= "@+id/il_bottom"Android:layout_width= "Match_parent"Android:layout_height= "20DP"Android:layout_alignparentbottom= "true"Layout= "@layout/il_bottom" />    <!--Body Part -    <RelativelayoutAndroid:layout_below= "@id/il_title"Android:layout_above= "@id/il_bottom"></Relativelayout></Relativelayout>

2.5 screen Adaptation

2.5.1 width Adaptation

2.5.2 Height Adaptation

[Android] Interface Division

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.