WEB开发网
开发学院手机开发Android 开发 android listView 子控件事件错行处理 阅读

android listView 子控件事件错行处理

 2012-11-16 15:34:01 来源:WEB开发网   
核心提示:{// if(holderData.getSpinnerIndex() == 2)// {// Log.i("比较打印出来瞧瞧", String.valueOf(position));// Log.i("点击打印出来瞧瞧", String.valueOf(index));// /
{
// if(holderData.getSpinnerIndex() == 2)
// {
// Log.i("比较打印出来瞧瞧", String.valueOf(position));
// Log.i("点击打印出来瞧瞧", String.valueOf(index));
//
// }

//Log.i("文本输入值:", holderData.getDescription());
// if(holderDatas.size() > index)
// Log.i("文本输入值1:", holderDatas.get(position).getDescription());
oldViewData = true;
viewHolder.spinner.setSelection(holderData.getSpinnerIndex(),true);
if(holderData.getDescription() != null)
{
viewHolder.disposeDescription.setText(holderData.getDescription());
}

if(holderData.getImageList() != null)
{
ImageAdapter adapter = new ImageAdapter(holderData.getImageList(),context);
viewHolder.photograph.setAdapter(adapter);
viewHolder.photograph.setOnItemClickListener(pictureView_ItemClickListener);
}

}
}

if(!oldViewData)
{
if(holderDatas.size() < list.size())
{
ViewHolderData viewHolderData = new ViewHolderData();
//Log.i("添加打印出来瞧瞧", String.valueOf(position));
viewHolderData.setPosition(position);
holderDatas.add(viewHolderData);
}

// if(holderDatas.size() > index)

// patrolReportBackData = patrolReportBackDatas.get(index);

}
}
return convertView;
}

static class ViewHolder {
TextView id;
TextView name;
Spinner spinner;
RelativeLayout relativeLayout;
EditText disposeDescription;
TextView addPicture;
MyGridView photograph;
}


static class ViewHolderData {
String description;
int spinnerIndex;
String strBitPhoto;
ArrayList<HashMap<String, Object>> imageList;
int position;

public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getSpinnerIndex() {
return spinnerIndex;
}
public void setSpinnerIndex(int spinnerIndex) {
this.spinnerIndex = spinnerIndex;
}
public String getStrBitPhoto() {
return strBitPhoto;
}
public void setStrBitPhoto(String strBitPhoto) {
this.strBitPhoto = strBitPhoto;
}
public ArrayList<HashMap<String, Object>> getImageList() {
return imageList;
}
public void setImageList(ArrayList<HashMap<String, Object>> imageList) {
this.imageList = imageList;
}
public int getPosition() {
return position;
}
public void setPosition(int position) {
this.position = position;
}


}


public void result(int requestCode, int resultCode, Intent data)
{
String log = "返回值时间:" + Communal.getInstance().getFormatDate("") + "返回值:" + requestCode + "dd" + resultCode + "cc" + data;
LogFile.getInstance().addLog(log);
// 拍照
if (requestCode == PHOTOHRAPH) {
//设置文件保存路径这里放在跟目录下

上一页  2 3 4 5 6 7 8 9 10  下一页

Tags:android listView 控件

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接