Properly update dashboard grid size on device rotate
@@ -75,8 +75,6 @@ public class AdvancedFragment extends SettingsFragment implements Preference.OnP
boolean lockHomeToggle = U.hasSupportLibrary(getActivity()) && pref.getBoolean("launcher", false);
findPreference("launcher").setEnabled(!lockHomeToggle);
-
- updateDashboardGridSize(false);
}
AppCompatActivity activity = (AppCompatActivity) getActivity();
@@ -88,6 +86,13 @@ public class AdvancedFragment extends SettingsFragment implements Preference.OnP
finishedLoadingPrefs = true;
}
+ @Override
+ public void onResume() {
+ super.onResume();
+
+ updateDashboardGridSize(false);
+ }
+
@SuppressLint("SetTextI18n")
@Override
public boolean onPreferenceClick(final Preference p) {
