Getting started with Android Engineers (1)-this week's entrance, time-consuming, light-spraying, and android engineers
Squeeze time, first.
I. Environment Construction
.
Ii. Project Structure
In studio, project = Module;
Res: all resources applied --The size of the generated APK is basically determined.;
Java: java source program;
Manifests: inventory fileFor all configurations, the first access point for each execution;
-- Res
Drawable: Stores image resources;
Layout: layout;
Menu: exclusive menu layout;
Mipmap: Mipmaps can be used as early as Android2.2 +, but it is not strongly recommended until google 4.3. Placing images on mipmaps can speed up image rendering, improve image quality, and reduce GPU pressure;
Values: stores strings, themes, colors, and styles;
3. Enter and display text on the Interface
3.1 control Overview
TextView: displays text box controls;
EditText: Enter the text box;
-- Common attributes
Android: id -- Control id;
Android: layout_width -- the width of the space;
~ Height;
~ Text -- text content;
~ TextSize -- text size;
~ TextColor;
~ Background;
There are two more EditText :~ Hint input prompt text; inputType input text type
3.2 Implementation
In main. xml of layout
<! -- Wrap_content: contains the actual text content match_parent: the current control is full of the parent class container fill_parent: Same as above, for earlier versions of sdk -->
<TextView android: id = "@ + id/textView1" android: layout_width = "wrap_content" android: layout_height = "match_parent" android: text = "name:" android: textSize = "28sp" android: textColor = "#000000"/> <EditText android: hint = "enter your name" android: id = "@ + id/editText1" android: layout_width = "match_parent" android: layout_height = "match_parent"/>