Skip to content

Commit

Permalink
Merge branch 'fix_acct_list' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
codinguser committed Apr 19, 2016
2 parents 637cefc + 11463b3 commit 151a1fd
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ public enum DisplayMode {
*/
protected static final String TAG = "AccountsListFragment";

/**
* Tag to save {@link AccountsListFragment#mDisplayMode} to fragment state
*/
private static final String STATE_DISPLAY_MODE = "mDisplayMode";

/**
* Database adapter for loading Account records from the database
*/
Expand Down Expand Up @@ -176,6 +181,9 @@ public void onCreate(Bundle savedInstanceState) {
Bundle args = getArguments();
if (args != null)
mParentAccountUID = args.getString(UxArgument.PARENT_ACCOUNT_UID);

if (savedInstanceState != null)
mDisplayMode = (DisplayMode) savedInstanceState.getSerializable(STATE_DISPLAY_MODE);
}

@Override
Expand Down Expand Up @@ -295,6 +303,12 @@ public void refresh() {
getLoaderManager().restartLoader(0, null, this);
}

@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putSerializable(STATE_DISPLAY_MODE, mDisplayMode);
}

/**
* Closes any open database adapters used by the list
*/
Expand Down

0 comments on commit 151a1fd

Please sign in to comment.