qianfeng-android-day01-history, Environment construction, view properties, LinearLayout detailed basic Learning

Source: Internet
Author: User

First, Simulator:
1. Night Gods
2.Genymotion

Second, the Android environment variable configuration:
Android_sdk_home:d:\program\android\sdkforeclipse
Path:%android_sdk_home%\tools;%android_sdk_home%\platform-tools

Third, the ADB command:
View all emulators: Android list AVD
Launch simulator: EMULATOR-AVD emulator name
Installs the APP:ADB install app name. apk
Uninstall app:adb Uninstall App package name
Delete Emulator: Android Delete AVD--name name
Show all currently running emulators: ADB devices
View ADB command Help information: ADB
View the log information on the command line: ADB logcat-s label signature

IV. directory structure of the new Android project
SRC: Storing Java code
Libs: Storage of third-party class libraries
Assets: Storing large files without generating R references
Res-drawable: Storing picture resources
Res-layout: Storing layout files
Res-menu: Store Menu file
Res-values: Storing the referenced value

V. Classification of containers
ViewGroup:
Absolutelayout,tablelayout
Linearlayout,relativelayout,framelayout,gridlayout

Vi. View Public properties
Android:layout_width= the width of the "match_parent" control, match_parent means full screen, wrap_content indicates the contents of the package
Android:layout_height= the width of the "match_parent" control, match_parent means full screen, wrap_content indicates the contents of the package
Android:background= "#836FFF" indicates the background color of the control
android:paddingleft= "20DP" set padding
android:margintop= "" Setting the margin
Android:visibility= "Gone" to set the visibility of the control, invisiable means not visible but occupies position, gone means invisible but no occupy position
Android:id= "@+id/linearlayout" to set the ID of the control
Android:alpha= "0" setting transparency

Seven, LinearLayout detailed
LinearLayout Unique Properties:
android:orientation= "Vertical" sets the arrangement of controls in LinearLayout, displayed by default
android:gravity= "Bottom|right" setting the display position of controls in the container
android:layout_gravity= "Center" sets the current control's display position in its parent container
android:weightsum= "3" sets the weight sum of the control
android:layout_weight= "1" to set weights for controls

qianfeng-android-day01-history, Environment construction, view properties, LinearLayout detailed basic Learning

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.