Android Basics
Android uses container layout properties to manage the location of child controls
Layout is the process of placing all the controls on the interface in the correct position according to their spacing
Seven layouts for Android
- LineLayout: Linear layout
- RelativeLayout: RelativeLayout
- FrameLayout: FrameLayout
- AbsoluteLayout: AbsoluteLayout
- TableLayout: TableLayout
- GridLayout: GridLayout
- ConstraintLayout: ConstraintLayout
Four Components of Android
- Activity: A visual interface for interacting with users
- Service: a solution for implementing programs running in the background
- Content Provider: A content provider that provides data needed by an application
- Broadcast receiver: a broadcast receiver that listens for the arrival of external events (such as incoming calls)
The commonly used control
- TextView: Text control
- EditText: Editable text control
- Button, Button
- ImageButton: ImageButton
- ToggleButton: Switch button
- ImageView: Image control
- CheckBox: CheckBox control
- RadioButton: a single box control
layout
A container for holding many controls;
You can adjust the position of internal space according to certain rules, so as to write a beautiful interface;
In addition to preventing space, the interior of the layout can also prevent layout, through the nesting of multiple layers of layout, can accomplish some of the less impressive interface
IOS Basics
layout
IOS removes the concept of layout and directly uses the relative relationship between variables to complete the calculation of position
The development environment
- System: MacOS X
- Development tool: Xcode
- Development language: ObjectC
- Installation file:.ipa /.app
Using Appium to test iOS apps requires MacOS
Control basics
- Dom: Document Object Model
- Dom application: first used in HTML and JS interaction; It is used to express the spatial hierarchy of the interface and the structural description of the interface. The common formats are HTML and XML. The core elements are nodes and attributes
- Xpath: XML path language for node location in XML
The Android app hierarchy is a custom XML, unlike HTML
APP Source is similar to DOM. It is used to represent the hierarchy of APP and represents the structure of all spatial trees in the interface
Each space has its attributes (resourceID, xpath, AID), but no CSS attributes
Basic attributes
- clickable
- content-desc
- resource-id
- text
- bounds
Differences between iOS and Android
- Dom attributes are similar to node structures
- Names and attributes are named differently
-
- The Android: resourceid; IOS: name
- Android: contest – desc; IOS: the org.eclipse.swt.accessibility – id