Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public void onListItemClick(ListView parent, View v, int position, long id) {
  2. Toast.makeText(this,
  3. "You have selected " + lv_arr[position],
  4. Toast.LENGTH_SHORT).show();
  5. }
  6.  
  7. <activity android:name=".WhiteListView"/>
  8.  
  9. @Override
  10. public void onListItemClick( ListView parent, View v, int position, long id) {
  11. Intent lancon = new Intent(this, viewContact.class);
  12. //lancon.putExtra("id", id);
  13. //or
  14. c.moveToPosition(position);
  15. id = c.getInt(0);
  16. c.close();
  17. lancon.putExtra("id", id);
  18. this.startActivity(lancon);
  19. finish();
  20. }
  21.  
  22. this._id = this.getIntent().getLongExtra("id", 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement