2
나는 경로 목록을 테이블 레이아웃에 가지고 있습니다. CheckBox & TextView가 동적으로 생성되었습니다. 체크 박스 ID를 설정했습니다.checkbox selectAll DeselectAll in tableLayout
내가 선택하고 싶습니다 & 선택을 취소하십시오. 어떻게 구현할 수 있습니까?
나는 ...이 CheckBox cb = (CheckBox)view.findViewById(R.id.????);
tl = (TableLayout) findViewById(R.id.dailyDRoute);
ArrayList<SalesRoutes> routeList = getSalesRoute();
for (int i = 0; i < routeList.size(); i++) {
TableRow tr = new TableRow(this);
CheckBox ch = new CheckBox(this);
ch.setHeight(1);
ch.setId(i);
TextView tv2 = new TextView(this);
tr.addView(ch);
tv2.setText(routeList.get(i).getDescription());
tv2.setTextColor(Color.BLACK);
tr.addView(tv2);
tl.addView(tr);
}
}
public void deselectAll(View view){
// CheckBox cb = (CheckBox)view.findViewById(R.id.);
}
public void selectAll(View view){
}
제발 도와주세요 호출하는 방법을 사전에
감사합니다 ..
덕분에 그 작업을 잘 ... . – Piraba