I’ve done a custom ArrayAdapter that contains two views: an ImageView and a TextView. Then I set a ListView with this ArrayAdapter.
When I click on a row of the ListView the onItemClick(...) is invoked and I want to do this:
OnItemClickListener cl = new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(getApplicationContext(), ClubList.class);
intent.putExtra("CountryName", ((TextView) view).getText());
startActivity(intent);
}
};
Obviously, I can’t do ((TextView) view).getText() because it’s a view that contains one ImageView and one TextView. How can I get access to the text of the TextView?
i don’t know if these work’s
and then