Merge "Set the linear layout direction based on initial config" into tm-qpr-dev am: bef8a5be14

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19611365

Change-Id: Ic796675863602bc19693357f27e3ecc509201a16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Mady Mellor
2022-08-16 23:01:51 +00:00
committed by Automerger Merge Worker

View File

@@ -105,6 +105,10 @@ public class DragLayout extends LinearLayout {
MATCH_PARENT)); MATCH_PARENT));
((LayoutParams) mDropZoneView1.getLayoutParams()).weight = 1; ((LayoutParams) mDropZoneView1.getLayoutParams()).weight = 1;
((LayoutParams) mDropZoneView2.getLayoutParams()).weight = 1; ((LayoutParams) mDropZoneView2.getLayoutParams()).weight = 1;
int orientation = getResources().getConfiguration().orientation;
setOrientation(orientation == Configuration.ORIENTATION_LANDSCAPE
? LinearLayout.HORIZONTAL
: LinearLayout.VERTICAL);
updateContainerMargins(getResources().getConfiguration().orientation); updateContainerMargins(getResources().getConfiguration().orientation);
} }