android listView 子控件事件错行处理
2012-11-16 15:34:01 来源:WEB开发网import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
public class PatrolAdapter extends BaseAdapter {
private List<TaskTemplateDetail> list = null;
private LayoutInflater inflater;
private Context context = null;
List<PatrolReportBackData> patrolReportBackDatas = null;
public static final int NONE = 0;
public static final int PHOTOHRAPH = 1;// 拍照
public static final int PHOTOZOOM = 2; // 缩放
public static final int PHOTORESOULT = 3;// 结果
public static final String IMAGE_UNSPECIFIED = "image/*";
byte[] bitmapBytes = new byte[1024];
protected String bitPhoto = "";
ApplicationActivity activity;
protected ArrayList<HashMap<String, Object>> imageItem = null;
int index = -1;
protected MyGridView photograph = null;
List<ViewHolderData> holderDatas = null;
//PatrolReportBackData patrolReportBackData = null;
int viewIndex = 0;
boolean changed = true;
public PatrolAdapter(List<TaskTemplateDetail> list,Context context,List<PatrolReportBackData> patrolReportBackDatas,ApplicationActivity activity)
{
this.list = list;
this.context = context;
this.inflater = LayoutInflater.from(context);
this.patrolReportBackDatas = patrolReportBackDatas;
this.activity = activity;
imageItem = new ArrayList<HashMap<String, Object>>();
holderDatas = new ArrayList<ViewHolderData>();
for (int i = 0; i < patrolReportBackDatas.size(); i++) {
String isNormal = patrolReportBackDatas.get(i).getIsNormal();
if(isNormal != null)
{
bitPhoto = patrolReportBackDatas.get(i).getPhotos();
更多精彩
赞助商链接