1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

PullToRefresh: use setMode() to restore mode in onRestoreInstanceState()

When restoring a mode != DISABLED with the current mode being DISABLED
the header and/or footer layout weren't added to the view. That's why we
now call setMode() instead of setting mMode directly.
This commit is contained in:
cketti 2012-12-14 12:01:25 +01:00
parent bcd52a6707
commit efd1c5b4a9

View File

@ -683,7 +683,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
mMode = Mode.mapIntToValue(bundle.getInt(STATE_MODE, 0));
setMode(Mode.mapIntToValue(bundle.getInt(STATE_MODE, 0)));
mCurrentMode = Mode.mapIntToValue(bundle.getInt(STATE_CURRENT_MODE, 0));
mDisableScrollingWhileRefreshing = bundle.getBoolean(STATE_DISABLE_SCROLLING_REFRESHING, true);