Skip to content

Commit

Permalink
Pretty sure this finally fixes #185.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Banes committed Dec 29, 2012
1 parent e10106b commit a78c6cd
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -840,13 +840,28 @@ protected final Parcelable onSaveInstanceState() {

@Override
protected final void onSizeChanged(int w, int h, int oldw, int oldh) {
if (DEBUG) {
Log.d(LOG_TAG, String.format("onSizeChanged. W: %d, H: %d", w, h));
}

super.onSizeChanged(w, h, oldw, oldh);

// We need to update the header/footer when our size changes
refreshLoadingViewsSize();

// Update the Refreshable View layout
refreshRefreshableViewSize(w, h);

/**
* As we're currently in a Layout Pass, we need to schedule another one
* to layout any changes we've made here
*/
post(new Runnable() {
@Override
public void run() {
requestLayout();
}
});
}

/**
Expand Down Expand Up @@ -902,10 +917,6 @@ protected final void refreshLoadingViewsSize() {
}

protected final void refreshRefreshableViewSize(int width, int height) {
if (DEBUG) {
Log.d(LOG_TAG, String.format("refreshRefreshableViewSize. W: %d, H: %d", width, height));
}

// We need to set the Height of the Refreshable View to the same as
// this layout
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mRefreshableViewWrapper.getLayoutParams();
Expand Down

0 comments on commit a78c6cd

Please sign in to comment.