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

android listView 子控件事件错行处理

 2012-11-16 15:34:01 来源:WEB开发网   
核心提示:.view.View;import android.view.View.OnTouchListener;import android.view.ViewGroup;import android.view.ViewGroup.LayoutParams;import android.widget.AdapterView;i
.view.View;
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();

上一页  1 2 3 4 5 6 7  下一页

Tags:android listView 控件

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