Android (2)

Source: Internet
Author: User

1. An activity is a class, extends activity
2. The OnCreate method must be overwrite. The first activity of the app is displayed on the phone when the app is first run, and the activity's OnCreate method is called by the Android operating system framework.
3. Because each activity is an application component, it needs to be registered in the Androidmanifest.xml. The values of all XML attributes in the configuration file are key-value pairs that have already been registered in R.java.
4. Add the necessary controls to the activity, written in the XML file in the layout directory, and the control layout
5.usually, an activity corresponding to a layout of the XML file, easy to manage
(similar to a developer set of Struts-config,sqlmap,applicationcontext XML files)
6. After configuring each control in layout, use the Findviewbyid method in the activity's OnCreate method to get the control

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.