android下拉菜单(3)
来源:未知 责任编辑:责任编辑 发表时间:2014-02-18 03:21 点击:次
if(deleteData != null){
deleteData.selected(selectedItem);
}
}
private void setDelete(int position){
if(deleteData != null){
deleteData.deletePosition(position);
}
}
public interface DeleteData {
public void deletePosition(int position);
public void selected(String position);
}
class PullDownListAdapter extends BaseAdapter {
private ArrayList<HashMap<String, Object>> list = new ArrayList<HashMap<String, Object>>();
private Activity activity = null;
public PullDownListAdapter(Activity _activity,
ArrayList<HashMap<String, Object>> _list) {
activity = _activity;
list = _list;
}
public int getCount() {
return list.size();
}
public Object getItem(int position) {
return list.get(position);
}
public long getItemId(int position) {
return position;
}
public View getView(final int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
holder = new ViewHolder();
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>