I have activity in my application in which rss feeds are displayed and next to each image are the arrows of the RSS file.
I am new to android, any help would be appreciated.
I will explain what I do to display rss news ...
I have a separate xml xml layout for one rss. I set the id for the arrow image (which will move to the next action) in it, like iv_arrow_img, I repeat the news feeds that I get, and for each news feed I add a dummy view again and again ... my question is how will I distinguish between different arrow icons of the image ... because at the moment everyone has the same identifier ... I set onclick listeners to them below in my code
I wrote the code
Iterator itr = data.iterator();
int i =0; while (itr.hasNext()) { NewsPostDTO newspostdto = itr.next();
view = inflater.inflate(R.layout.rl_news_item, null);
lnContentView.addView(view, LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT);
ivArrowfwd = (ImageView) view.findViewById(R.id.iv_arrowfwd);
tvNewsHeading.setText(newspostdto.getFeaturedDesc());
tvNewsContent.setText(newspostdto.getDate() + " - " + newspostdto.getTitle());
ivArrowfwd.setId(id);
ivArrowfwd.setTag(newspostdto);
ivArrowfwd.setOnTouchListener(new OnTouchListener(){
@Override
public boolean onTouch(View arg0, MotionEvent arg1) {
System.out.println("sdfsdf" +(ImageView) view.findViewById(id).getTag());
return false;
}
});
id++;
}
, . - , ...?