Try something like this :
listItem.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
public void onGlobalLayout() {
int listItemHeight = listItem.getHeight();
}
});
If you want the height of the listView then try this :
listView.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
public void onGlobalLayout() {
int listViewHeight = listView.getHeight();
}
});
You could also check this : Calculate the size of a list view or how to tell it to fully expand