It worked for me (mc.android.developer):
listview.getViewTreeObserver().addOnPreDrawListener(OnPreDrawListener);
private final ViewTreeObserver.OnPreDrawListener OnPreDrawListener = new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
//do changes
return true;
}
};