From efd1c5b4a980881f9e8e33fc966ed623d7f05da2 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 14 Dec 2012 12:01:25 +0100 Subject: [PATCH] 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. --- .../com/handmark/pulltorefresh/library/PullToRefreshBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Android-PullToRefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java b/plugins/Android-PullToRefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java index cb2fb897b..37d2bf7f3 100644 --- a/plugins/Android-PullToRefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java +++ b/plugins/Android-PullToRefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java @@ -683,7 +683,7 @@ public abstract class PullToRefreshBase 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);