你的顯示內容應該這麼寫- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- final String name = contactsArrayList.get(position).get(NAME);
- final String number = contactsArrayList.get(position).get(NUMBER);
- new AlertDialog.Builder(ProviderContactDemoActivity.this);
- Intent newAct = new Intent();
- newAct.setClass(ProviderContactDemoActivity.this, personalActivity.class );
- // 顯示內容
-
- String sel=parent.getItemAtPosition(position).toString();
- Bundle bundle = new Bundle();
- bundle.putString("sel", sel);
- newAct.putExtras(bundle);
- startActivity(newAct);
- }
- });
複製代碼 |