|
|
|
@ -171,10 +171,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
Log.i("Orientation=" + config.orientation + " normal=" + normal +
|
|
|
|
|
" landscape=" + landscape + "/" + landscape3);
|
|
|
|
|
|
|
|
|
|
boolean portrait = (config.orientation == ORIENTATION_PORTRAIT || !normal || !landscape);
|
|
|
|
|
view = LayoutInflater.from(this).inflate(portrait
|
|
|
|
|
? (portrait2 ? R.layout.activity_view_portrait_split : R.layout.activity_view_portrait)
|
|
|
|
|
: R.layout.activity_view_landscape, null);
|
|
|
|
|
int viewId;
|
|
|
|
|
if (config.orientation == ORIENTATION_PORTRAIT || !normal || !landscape)
|
|
|
|
|
viewId = (portrait2 ? R.layout.activity_view_portrait_split : R.layout.activity_view_portrait);
|
|
|
|
|
else
|
|
|
|
|
viewId = R.layout.activity_view_landscape_split;
|
|
|
|
|
view = LayoutInflater.from(this).inflate(viewId, null);
|
|
|
|
|
setContentView(view);
|
|
|
|
|
|
|
|
|
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
|
|
@ -184,7 +186,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
content_separator = findViewById(R.id.content_separator);
|
|
|
|
|
content_pane = findViewById(R.id.content_pane);
|
|
|
|
|
|
|
|
|
|
if ((portrait ? portrait2 : !landscape3) && Helper.isFoldable()) {
|
|
|
|
|
if (Helper.isFoldable() &&
|
|
|
|
|
(viewId == R.layout.activity_view_portrait_split ||
|
|
|
|
|
viewId == R.layout.activity_view_landscape_split)) {
|
|
|
|
|
View content_frame = findViewById(R.id.content_frame);
|
|
|
|
|
ViewGroup.LayoutParams lparam = content_frame.getLayoutParams();
|
|
|
|
|
if (lparam instanceof LinearLayout.LayoutParams) {
|
|
|
|
@ -243,7 +247,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
|
|
|
|
|
int drawerWidth;
|
|
|
|
|
DisplayMetrics dm = getResources().getDisplayMetrics();
|
|
|
|
|
if (portrait || !landscape3) {
|
|
|
|
|
if (viewId != R.layout.activity_view_landscape_split || !landscape3) {
|
|
|
|
|
int actionBarHeight;
|
|
|
|
|
TypedValue tv = new TypedValue();
|
|
|
|
|
if (getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true))
|
|
|
|
|