Bug 869411 - Part 4: Save top padding state in AboutHome. r=lucasr

This commit is contained in:
Brian Nicholson 2013-05-23 11:29:43 -07:00
parent 8db15eb084
commit 2258b24e54

View File

@ -44,6 +44,8 @@ public class AboutHome extends Fragment {
private RemoteTabsSection mRemoteTabsSection; private RemoteTabsSection mRemoteTabsSection;
private TopSitesView mTopSitesView; private TopSitesView mTopSitesView;
private static final String STATE_TOP_PADDING = "top_padding";
public interface UriLoadListener { public interface UriLoadListener {
public void onAboutHomeUriLoad(String uriSpec); public void onAboutHomeUriLoad(String uriSpec);
} }
@ -61,6 +63,10 @@ public class AboutHome extends Fragment {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
mLightweightTheme = ((GeckoApplication) getActivity().getApplication()).getLightweightTheme(); mLightweightTheme = ((GeckoApplication) getActivity().getApplication()).getLightweightTheme();
if (savedInstanceState != null) {
mPaddingTop = savedInstanceState.getInt(STATE_TOP_PADDING, 0);
}
} }
@Override @Override
@ -250,4 +256,10 @@ public class AboutHome extends Fragment {
// onViewCreated(). // onViewCreated().
mTopPadding = topPadding; mTopPadding = topPadding;
} }
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt(STATE_TOP_PADDING, mPaddingTop);
}
} }