[Android] interface division, android interface Division

Source: Internet
Author: User

[Android] interface division, android interface Division

1. unified interface management

1.1 Use an activity to manage all interfaces of an application

1.1.1 understand the relationship between Activity, Window, and View

1.1.2 avoid problems caused by excessive Activity,

For example, you can exit the application and frequently change the configuration file.

Unified interface style to reduce users' learning costs

 

2. Interface Division

2.1 presentation, preliminary division of the interface

2.2 interface management implementation

2.2.1 title extraction management

2.2.2 extract bottom Navigation Management

2.2.3 extract intermediate content part management and establish a partial Content Switching Mechanism

2.2.4 improve user prompt mechanism

 

2.3 preparations

2.3.1 Import image, text, and other resource files

Project can be used as a libirary Library

 

2.3.2 description of naming rules

Prevent name conflicts

2.4 set layout file for Activity

2.4.1 create three title part la s and two navigation part la s

2.4.2 use <include/> to include the layout file in the main layout File

 

<? Xml version = "1.0" encoding = "UTF-8"?> <RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" android: layout_width = "match_parent" android: layout_height = "match_parent"> <! -- TITLE section --> <include android: id = "@ + id/il_title" android: layout_width = "match_parent" android: layout_height = "20dp" android: layout_alignParentTop = "true" layout = "@ layout/il_title"/> <! -- Navigation --> <include android: id = "@ + id/il_bottom" android: layout_width = "match_parent" android: layout_height = "20dp" android: layout_alignParentBottom = "true" layout = "@ layout/il_bottom"/> <! -- Subject part --> <RelativeLayout android: layout_below = "@ id/il_title" android: layout_above = "@ id/il_bottom"> </RelativeLayout>

 

 

 

2.5 screen adaptation

2.5.1 width adaptation

2.5.2 highly adaptive

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.