Fix being stuck in small-icon mode after resizing to minimum size on Android N

This commit is contained in:
Cameron Gutman 2016-04-19 19:28:46 -04:00
parent 4a19038d54
commit 2f002bfa4a
2 changed files with 12 additions and 1 deletions

View File

@ -108,6 +108,17 @@ public class AppView extends Activity implements AdapterFragmentCallbacks {
}
};
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
getFragmentManager().beginTransaction()
.replace(R.id.appFragmentContainer, new AdapterFragment())
.commitAllowingStateLoss();
appGridAdapter.notifyDataSetChanged();
}
private void startComputerUpdates() {
// Don't start polling if we're not bound or in the foreground
if (managerBinder == null || !inForeground) {

View File

@ -100,7 +100,7 @@ public class PreferenceConfiguration {
}
// Use small mode on anything smaller than a 7" tablet
return context.getResources().getConfiguration().smallestScreenWidthDp < 600;
return context.getResources().getConfiguration().screenWidthDp < 600;
}
public static int getDefaultBitrate(Context context) {