и нужно ли переделывать адаптер ?
mData.add(new ListData("hello ",299,R.drawable.alkap ));
mData.add(new ListData("карка " ,9,R.drawable.dakota ));
mData.add(new ListData("лалка " ,99,R.drawable.saiman ));
public void setContentView(View contentView, int position, HorizontalScrollView parent) {
ListData p=((ListData) getItem(position));
TextView tv = (TextView)contentView.findViewById(R.id.textView2);
tv.setText(p.price+"руб");
TextView tv1 = (TextView)contentView.findViewById(R.id.tv);
tv1.setText(p.title);
ImageView tv3 = (ImageView) contentView.findViewById(R.id.imageView1);
tv3.setImageResource(p.image);
}
//实现setActionView方法
@Override
public void setActionView(final View contentView,final int position, final HorizontalScrollView parent) {
ListData p=((ListData) getItem(position));
final String name = p.title;
final int price = p.price;
final int image = p.image;