summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mady Mellor <madym@google.com> 2022-08-16 22:44:07 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-08-16 22:44:07 +0000
commitbef8a5be14eb744c4be91fd22a0e7d15cb4552e9 (patch)
tree3f1266156ca86fd8154f017f22ed6c9bb45c90e4
parent3234afdaf304b00d2111bdd92db1b6c8854af6c9 (diff)
parent66b33cb5d182bf6aa16740e0a94939e3954f9aa0 (diff)
Merge "Set the linear layout direction based on initial config" into tm-qpr-dev
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java
index ff3c0834cf62..497a6f696df8 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java
@@ -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);
}