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

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

Change-Id: Ib87bb254d8d383890f49485910eb778e113db468
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Mady Mellor
2022-08-17 14:02:43 +00:00
committed by Automerger Merge Worker

View File

@@ -105,6 +105,10 @@ public class DragLayout extends LinearLayout {
MATCH_PARENT));
((LayoutParams) mDropZoneView1.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);
}