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

This commit is contained in:
Mady Mellor
2022-08-16 22:44:07 +00:00
committed by Android (Google) Code Review

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);
} }