protected void onResume(){
listTimer = (ListView) findViewById(R.id.listTimer);
fetchData();
tadapt = new TimerAdapter(RoutineList, this);
listTimer.setAdapter(tadapt);
listTimer.performItemClick(v1, 0, listval);
super.onResume();
}
listTimer.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
v1 = arg0;
pos = arg2;
listval = arg3;
View v = arg0.getChildAt(arg2);
TextView tvM = (TextView) v.findViewById(R.id.tvETimer);
}
注意:我在視圖上得到了Nullpointerexception。Nullpointerexception itemclick事件的列表視圖
它給出了相同的錯誤。 – Riser
是您的活動列表活動?在哪一行顯示錯誤? – Deepzz
沒有..它沒有列出活動。 – Riser