Implement your own ListAdapter.

On 2 okt, 01:06, Rohit Mordani <[EMAIL PROTECTED]> wrote:
> Hi,
>      I am accessing Contacts data and passing that into a list. I want
> to modify the data that I get from the database and then pass it to
> the list view. Is there a way to do that ? This is what my OnCreate()
> looks like.
>
> public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>         mCursor = getContentResolver().query(People.CONTENT_URI,
>                                 null, null, null, null);
>         startManagingCursor(mCursor);
>         ListAdapter adapter = new SimpleCursorAdapter(this,
> R.layout.two_item_row, mCursor,
>
> new String[] {People.NAME, People.NUMBER},
>
> new int[] {R.id.text1, R.id.text2});
>
>         setListAdapter(adapter);
>     }
>
> Do I need to create m own CursorAdapter (maybe inherit from
> SimpleCursorAdapter??) If so then what methods do I need to override?
>
> I also want to add a column that has data from some other source. Is
> there  a way to do that?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to