I am trying to get the Checkbox of the first item in a ListView. My code below:
Query recent = databaseRef.limitToLast(5);
FirebaseListAdapter<Item> adapter = new FirebaseListAdapter<Item>(
this, Item.class, R.layout.custom_list_item, recent
) {
@Override
protected void populateView(View view, Item item, int i) {
((TextView) view.findViewById(R.id.item)).setText(item.getName());
((NumberPicker) view.findViewById(R.id.numberPicker)).setValue(item.getQuantity());
((CheckBox) view.findViewById(R.id.checkBox)).setChecked(false);
((TextView) view.findViewById(R.id.prosfora)).setText("s" +
"e prosfora");
View firstItem = itemLst.getChildAt(0);
}
};
itemLst.setAdapter(adapter);
I get the first item from the ListView but I don't know how I can get the checkbox from that first item.