Hi,
I have a class which extends ListActivity
public class GenericListActivity extends ListActivity
{
...
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setListAdapter(new GenericListAdapter(this));
}
}
public class GenericListAdapter extends BaseAdapter
{
public GenericListAdapter(Context context)
{
...
}
public View getView(int position, View convertView, ViewGroup
parent)
{
convertView = mInflater.inflate
(R.layout.genericlistview, null);
return convertView;
}
}
Here everything works fine. Now I want this adapter to work like the
ArrayAdapter having the property of
android.R.layout.simple_list_item_single_choice. That is single item
choicable like the ArrayAdapter of this next line
setListAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_single_choice,
GENRES));
GENRES = an array of string
I just want the views returned by getView method of the
GenericListAdapter should be single choice list items in the
ListActivity.
Please help me
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---