Android Development Note-01

Source: Internet
Author: User
Eclipse shortcut key: Guide package: Ctrl+alt+o format code: CTRL+ALT+F mvc:m--modelv--viewc--control Android Program Interface How to design, Debug UI (user interface) Interface → layout file xml layout in Android: LinearLayout linear layout: All controls are in a straight line. Level  Vertical relativelayout Relative layout: The position of a control relative to the B control tablelayout table layout: Table Framelayout frame layout equivalent to HTML: divabsolutelayout Absolute Layout: Absolute position of control (deprecated) Color.xml width, height parameter wrap_content: Determines the size of the control according to the content fill_parent, Match_parent: Depending on the length of the parent control, the length of the control depends on the resolution of the Android phone, There is no problem with Apple iOS (same specification) DP: Represents a density-independent pixel, the recommended control is used with the layout of the SP: represents a scalable pixel, generally to set the text size px: pixels, used on phones of different resolutions PT: Pound Factor, gravity= "center" on phones with different resolutions : The contents of the control are centered in the control; layout_gravity= "Center": the control is centered in the parent control. Response Event: 1, Call anonymous class, 2, bind directly to the control, add the property onclick on the button, and the activity adds a method to respond to the event, the name of the method is the same as the Android:onclick property value in the layout file! The parameters of the method are (view view), 3, the inner class is implemented, 4, the Onclicklistener interface is realized;

Android Development Note-01

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.