in a ListView, i override the method:
@Override
protected void onListItemClick(ListView l, View v, int position, long
id)
{
Intent intent = new Intent();
Uri uri;
String data;
switch (position)
{
// check the info of the second user
case 0:
data = "content://contacts/people/2";
uri = Uri.parse(data);
intent.setAction(Intent.ACTION_VIEW);
intent.setData(uri);
startActivity(intent);
break;
// edit the info of the second user
case 1:
data = "content://contacts/people/2";
uri = Uri.parse(data);
intent.setAction(Intent.ACTION_EDIT);
intent.setData(uri);
startActivity(intent);
break;
}
"case 0" run smoothly, but "case 1" got an error....
then how to edit it.
--
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