Created
November 23, 2012 22:03
-
-
Save theSociableme/4137497 to your computer and use it in GitHub Desktop.
ListView onItemClick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onPostExecute(ArrayList<Tip> result) { | |
TipsAdapter adapter = new TipsAdapter(mContext, result); | |
tips_list.setAdapter(adapter); | |
tips_list.setOnItemClickListener(new OnItemClickListener() { | |
@Override | |
public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { | |
Tip clicked_tip = (Tip) tips_list.getItemAtPosition(position); | |
Intent intent = new Intent(getApplicationContext(), MessageListActivity.class ); | |
intent.putExtra("tipId", clicked_tip.getId()); | |
startActivity(intent); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment