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