程序里的listview中有3个image buttons:play、detail、buy。
每一个 image button都有各自的action。那么在 listview 中对每一个 image button 怎样执行 onclick action?
我使用的代码:
public class AndroidThumbnailList extends ListActivity{
..........
public class MyThumbnaildapter extends ArrayAdapter<String>{
public MyThumbnaildapter(Context context, int textViewResourceId,String[] objects) {
super(context, textViewResourceId, objects);
// TODO Auto-generated constructor stub
}
public View getView(int position, View convertView, ViewGroup parent) {
.........
}
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
_contentUri = MEDIA_EXTERNAL_CONTENT_URI;
initVideosId();
setListAdapter(new MyThumbnaildapter(AndroidThumbnailList.this, R.layout.row, _videosId));
}
}
如何在 list view 创建 action ?