Android Learning-First day

Source: Internet
Author: User

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

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.