I need to calculate how many items fit on the screen. I tried do it in this way
private int callculateItemsOnPage(View layout, View item) {
if (layout == null || item == null)
return -1;
int itHeight = item.getHeight();
int layHeight = layout.getHeight();
return layHeight / itHeight;
}
But itHeight, layHeight permanently 0.
Can anyone help me with my issue?