mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 22:44:13 +00:00
Bug 869411 - Part 4: Save top padding state in AboutHome. r=lucasr
This commit is contained in:
parent
0c755d085e
commit
24524349b3
@ -44,6 +44,8 @@ public class AboutHome extends Fragment {
|
||||
private RemoteTabsSection mRemoteTabsSection;
|
||||
private TopSitesView mTopSitesView;
|
||||
|
||||
private static final String STATE_TOP_PADDING = "top_padding";
|
||||
|
||||
public interface UriLoadListener {
|
||||
public void onAboutHomeUriLoad(String uriSpec);
|
||||
}
|
||||
@ -61,6 +63,10 @@ public class AboutHome extends Fragment {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
mLightweightTheme = ((GeckoApplication) getActivity().getApplication()).getLightweightTheme();
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
mPaddingTop = savedInstanceState.getInt(STATE_TOP_PADDING, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -250,4 +256,10 @@ public class AboutHome extends Fragment {
|
||||
// onViewCreated().
|
||||
mTopPadding = topPadding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putInt(STATE_TOP_PADDING, mPaddingTop);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user