Is this possible to use the ListAdapter extends activity class? If yes means let me know please. Otherwise, What is the alternate Way?
It is technically possible to make a class that extends Activity
and implements the ListAdapter
interface, but there is no reason to do this. Instead, you would instantiate an implementation of the ListAdapter
inside your Activity
. ListAdapter
would provide data for a list, whereas an Activity
is essentially a "page" in your application.
Instead, you could use the already existing ListActivity
to make an activity that displays a list powered by a ListAdapter
. See "Binding to Data" in http://developer.android.com/reference/android/app/ListActivity.html .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.