"Sail Plan 003" 2015 sail plan Android Apidemo Devil Pace 02

Source: Internet
Author: User

Demos API

Apidemos details the Android platform main Api,android 5.0 mainly includes several large classes, covering hundreds of API examples:

02 Entrance Class

Apidemos uses the classification hierarchy display, Apidemo is Apidemos's entry class, inherits from the Listactivity, this class's main function is the classification lists the big class, then further displays the example.

Listactivity can be thought of as an activity with a ListView, you can set the layout without Setcontentview, unless you want to customize your list layout so that your layout must contain an ID of "@id/android:list" in the ListView. If you also specify a view with an ID of "@id/android:empty", the view is displayed when no data is displayed in the ListView, and The ListView will be hidden.

Listactivity How to use

Listactivity English API

Apidemo This class can be used as a reference example for listactivity.

In Apidemos's OnCreate () code:

        Intent Intent = Getintent ();        String Path = Intent.getstringextra ("Com.example.android.apis.Path");                if (path = = null) {            path = "";        }        Setlistadapter (New Simpleadapter (this, getData (path),                Android. R.layout.simple_list_item_1, new string[] {"title"},                new int[] {Android. R.ID.TEXT1}));        Getlistview (). Settextfilterenabled (True);

"Sail Plan 003" 2015 sail plan Android Apidemo Devil Pace 02

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.