The content of the study two aspects: Environment construction, basic knowledge
= = Environment Construction = = =
1. Download Android Studio (http://developer.android.com/sdk/index.html)
2. Install Android Studio (one-click installation)
3. Configure Android Studio (configure environment variables only)
Detailed
A) Download and installation without detailed description, the process is simple to explode, configuration only need to configure a PATH environment variable, my computer is Mac, process précis-writers:
Vim ~/.bash_profile
Android_sdk_home=~/library/android/sdk
Path= $ANDROID _sdk_home/tools: $ANDROID _sdk_home/platform-tools: $PATH
b) Add or update mobile phone to ADB device Management Service, easy to debug, simple steps is to open the service, update and view device information, run out of service
Start Android device service adb Start-server
Update Android device info Android update adb
To view connected device information ADB devices
Turn off Android device service ADB Kill-server
= = = Basic Knowledge = = =
1) activity is mainly to manage user interaction interface, heavy in management Oh, its ancestors are activity class, very good at interface painting, processing interface events
2) layout layouts, similar to article outlines, describe how each view of the UI interface is formatted, is a resource in the Android world, an XML file format, a typical resource and code separation style
3) commonly used XML attributes in Android, mainly in layout layouts
--Set the width and height of the view android:layout_width/android:layout_height
: Common value match_parent (as large as its Father view), Match_content (as much as possible to meet the content size of the view)
--Fill size android:padding
--Alignment Android:orientation
: Vertical/horizontal (Vertical/horizontal)
--Text Fill Android:text
: Directly fill in the text content, the second (recommended) Reference Strings.xml resource file, format @string/name
--Define Resource ID Android:id
: Define format @+id/id_name, resource ID is always an integer value
--Resource Description The Res directory under Android projects contains everything called resources, examples, layouts, text references, etc.
Android Learning-First day