listview中OnItemClick方法各个参数的作用

OnItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3)

1、arg0,arg2

m_listview.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1, int postion,long arg3) {
Intent intent = null;
switch (postion)
{
case 0:intent = new Intent(arg0.getContext(), Activity01.class);break;
case 1:intent = new Intent(arg0.getContext(), Activity01.class);break; }
startActivity(it);
}
});

2、arg1

public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
tv=(TextView)arg1.findViewById(R.id.textView1);
ss=tv.getText().toString();
db. delete("good", " goodname=?", new String[]{ss});

  

上一篇:thinkPHP5.0中使用header跳转没作用


下一篇:System单元对所有与COM相关的声明就这么多,需要倒背如流