[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