From 151924e94d148403b0579cbffd5c954a0923770c Mon Sep 17 00:00:00 2001 From: Tim Su Date: Wed, 10 Aug 2011 21:21:19 -0700 Subject: [PATCH] Save tab on rotate --- .../plugin-src/com/todoroo/astrid/actfm/TagViewActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewActivity.java b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewActivity.java index e139f516f..2ccb2c0dd 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewActivity.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewActivity.java @@ -97,6 +97,7 @@ public class TagViewActivity extends TaskListActivity implements OnTabChangeList protected static final int REQUEST_ACTFM_LOGIN = 3; private static final String MEMBERS_IN_PROGRESS = "members"; //$NON-NLS-1$ + private static final String TAB_IN_PROGRESS = "tab"; //$NON-NLS-1$ private TagData tagData; @@ -162,6 +163,9 @@ public class TagViewActivity extends TaskListActivity implements OnTabChangeList } }).start(); } + if(savedInstanceState != null && savedInstanceState.containsKey(TAB_IN_PROGRESS)) { + tabHost.setCurrentTab(savedInstanceState.getInt(TAB_IN_PROGRESS)); + } } @SuppressWarnings("nls") @@ -589,6 +593,7 @@ public class TagViewActivity extends TaskListActivity implements OnTabChangeList JSONArray members = tagMembers.toJSONArray(); outState.putString(MEMBERS_IN_PROGRESS, members.toString()); } + outState.putInt(TAB_IN_PROGRESS, tabHost.getCurrentTab()); } // --- events