Learn about common programming interfaces for Android

Source: Internet
Author: User

What is the programming model for mobile phone development?

The following is the Android programming interface, which seems to be similar to swing, especially the asynchronous processing model.

================================================

UI components
TextView
EditText
Tab+tabhost
Actionbar+fragment
Viewpager
Slidingmenu

Asynchronous execution
Asynctask

Layout
LinearLayout
Relativelayout
Framelayout
Tablelayout

Component
Activity File Registration

Component communication
Intent
Intent intent1= New Intent (Mainactivity.this, otheractivity.class);
StartActivity (INTENT1);

Broadcasting
Broadcastreceiver

Service
Service
Service requires registration


Method 1 for dynamically adding layouts.
LinearLayout ll = (linearlayout) this.getlayoutinflater (). Inflate (R.layout.main1,null);
Setcontentview (LL);
LinearLayout ll2 = (linearlayout) this.getlayoutinflater (). Inflate (R.LAYOUT.MAIN2,LL);
This main2 is added to the root node of the main1 as a sub-layout of the Main1

Ways to add layouts dynamically 2
Addview.linearlayout ll = (linearlayout) this.getlayoutinflater (). Inflate (R.layout.main1,null);
Setcontentview (LL);
LinearLayout ll2 = (linearlayout) this.getlayoutinflater (). Inflate (R.layout.main2,null);
Ll.addview (LL2);

Learn about common programming interfaces for Android

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.