Contact c = api.getContactByID(id);已经获得了指定人的联系人的所有相关信息,布局就要看自己的了。这里只是一个示例。

package com.iteedu.www;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class ContactActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String id = this.getIntent().getExtras().getString("id");
ContactAPI api = ContactAPI.getAPI();
api.setCr(getContentResolver());
Contact c = api.getContactByID(id);
String s = "id:" + id + "\n";
s += "名字:" + c.getDisplayName() + "\n电话:";
if ((c.getPhone() != null) && (c.getPhone().size() > 0))
for (int i = 0; i < c.getPhone().size(); i++) {
s += c.getPhone().get(i).getNumber() + "\n";
}
TextView tv = new TextView(this);
tv.setText(s);
setContentView(tv);
}
}