I have two layouts
main.xml ----- With one ListView (say listview_01).row.xml ----- With ImageView (say, imageView_01) and TextView (say, textView_01)
I populate listview_01 row.xmlmine as a string, using the array data that I have.
I wanted to perform an operation on an event onclick() imageView_01, its work.
I added onclick()in imageView_01to getView()my CustomlistAdapter.
But can someone tell me how to get the row index in the onClick () event of the listview_01 image of the row image, in CustomListAdapter?
Here is my code
Sorry, but I can’t download all my activity and adapter code.
SOME ACTIVITY CODE
listView_episodesList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
mQuickAction.show(arg1);
}
});
SOME adapter code
ImageView imageView_EpisodePic = (ImageView) convertView.findViewById(R.id.imageView_episode_pic);
drawableManager.fetchDrawableOnThread(episodeTemp.episodeImage, imageView_EpisodePic);
imageView_EpisodePic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
Toast.makeText(context, "Click on image", Toast.LENGTH_LONG).show();
}
});
listView, . .
ListView(main.xml) ImageView (row.xml)