|
|
|
@ -175,20 +175,19 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
startup = prefs.getString("startup", "unified");
|
|
|
|
|
|
|
|
|
|
Configuration config = getResources().getConfiguration();
|
|
|
|
|
final boolean normal = config.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_NORMAL);
|
|
|
|
|
final boolean portrait2 = prefs.getBoolean("portrait2", false);
|
|
|
|
|
final boolean portrait2c = prefs.getBoolean("portrait2c", false);
|
|
|
|
|
final boolean portrait3 = prefs.getBoolean("portrait3", false);
|
|
|
|
|
final boolean landscape = prefs.getBoolean("landscape", true);
|
|
|
|
|
final boolean landscape3 = prefs.getBoolean("landscape3", true);
|
|
|
|
|
Log.i("Orientation=" + config.orientation + " normal=" + normal +
|
|
|
|
|
Log.i("Orientation=" + config.orientation +
|
|
|
|
|
" portrait 2=" + portrait2 + " 2c=" + portrait2c + " nav=" + portrait3 +
|
|
|
|
|
" landscape 2=" + landscape + " nav=" + landscape3);
|
|
|
|
|
|
|
|
|
|
int viewId;
|
|
|
|
|
if (config.orientation == ORIENTATION_PORTRAIT && portrait2c)
|
|
|
|
|
viewId = R.layout.activity_view_landscape_split;
|
|
|
|
|
else if (config.orientation == ORIENTATION_PORTRAIT || !(normal && landscape))
|
|
|
|
|
else if (config.orientation == ORIENTATION_PORTRAIT || !landscape)
|
|
|
|
|
viewId = (portrait2 ? R.layout.activity_view_portrait_split : R.layout.activity_view_portrait);
|
|
|
|
|
else
|
|
|
|
|
viewId = R.layout.activity_view_landscape_split;
|
|
|
|
@ -235,8 +234,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
Log.i("Drawer opened");
|
|
|
|
|
owner.start();
|
|
|
|
|
|
|
|
|
|
if (normal &&
|
|
|
|
|
((portrait3 && config.orientation == Configuration.ORIENTATION_PORTRAIT) ||
|
|
|
|
|
if (((portrait3 && config.orientation == Configuration.ORIENTATION_PORTRAIT) ||
|
|
|
|
|
(landscape3 && config.orientation == Configuration.ORIENTATION_LANDSCAPE))) {
|
|
|
|
|
drawerLayout.setDrawerLockMode(LOCK_MODE_LOCKED_OPEN);
|
|
|
|
|
childContent.setPaddingRelative(childDrawer.getLayoutParams().width, 0, 0, 0);
|
|
|
|
@ -252,8 +250,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
else
|
|
|
|
|
owner.stop();
|
|
|
|
|
|
|
|
|
|
if (normal &&
|
|
|
|
|
((portrait3 && config.orientation == Configuration.ORIENTATION_PORTRAIT) ||
|
|
|
|
|
if (((portrait3 && config.orientation == Configuration.ORIENTATION_PORTRAIT) ||
|
|
|
|
|
(landscape3 && config.orientation == Configuration.ORIENTATION_LANDSCAPE)))
|
|
|
|
|
childContent.setPaddingRelative(
|
|
|
|
|
Math.round(slideOffset * childDrawer.getLayoutParams().width), 0, 0, 0);
|
|
|
|
|