Well, I have the code below. I created a FloatingActionButton
that takes a picture of all items that are in ListView
, but the list.getChildAt (i) .isEnable method is returning nullpointer. Any ideas to solve?
ListView list = JTaritronClientReportFragment.getInstance().getList();
list.setSelection(0);
int j=0;
while (j<list.getCount()) {
int lastPosition = list.getLastVisiblePosition();
for (int i = 0; i < list.getLastVisiblePosition() - list.getFirstVisiblePosition(); i++) {
if (list.getChildAt(i).isEnabled()) {
JUtil.saveScreenShot(list.getChildAt(i), "operadora" + j + ".png");
j++;
}
}
list.setSelection(lastPosition);
}