Open main menu
CDOT Wiki
β
Search
Changes
← Older edit
Newer edit →
MAP524/DPS924 Lecture 5
16 bytes removed
,
14:45, 18 July 2015
→
ListView
<pre>lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView parent, View view, int position, long id) {
Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show();
}
});</pre>
* Run your app again and this time select a colour by clicking it.
* You should see a Toast with the selected colour name pop up.
Andrew
Bureaucrats
,
Administrators
1,234
edits