Initial support for Rtl
This CL introduces a property to store layout direction (LD) value in
the node for later use in the modifier and measure scope. Also exposed
the layout direction to intrinsic measuring since it's needed for Text.
Bug: 146346559
Test: ran layout/core/platform tests + added new tests
Change-Id: Ia5519f42c6ded656242321a92c8c8069c2f42ab7
Relnote: Initial support for Rtl in Compose layout
diff --git a/ui/ui-core/api/0.1.0-dev05.txt b/ui/ui-core/api/0.1.0-dev05.txt
index 76d92b7..14c238f 100644
--- a/ui/ui-core/api/0.1.0-dev05.txt
+++ b/ui/ui-core/api/0.1.0-dev05.txt
@@ -172,23 +172,30 @@
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
- method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public default androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
public interface Measurable extends androidx.ui.core.IntrinsicMeasurable {
method public androidx.ui.core.Placeable measure(androidx.ui.core.Constraints constraints);
}
- public abstract class MeasureScope implements androidx.ui.unit.Density {
+ public abstract class MeasureScope implements androidx.ui.core.ModifierScope {
ctor public MeasureScope();
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
method public final androidx.ui.core.MeasureScope.LayoutResult layout(androidx.ui.unit.IntPx width, androidx.ui.unit.IntPx height, java.util.Map<androidx.ui.core.AlignmentLine,androidx.ui.unit.IntPx> alignmentLines = emptyMap(), kotlin.jvm.functions.Function1<? super androidx.ui.core.Placeable.PlacementScope,kotlin.Unit> placementBlock);
+ method public void setAmbientLayoutDirection(androidx.ui.core.LayoutDirection p);
+ method public void setLayoutDirection(androidx.ui.core.LayoutDirection p);
+ property public androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public androidx.ui.core.LayoutDirection layoutDirection;
}
public static interface MeasureScope.LayoutResult {
@@ -222,6 +229,13 @@
field public static final androidx.ui.core.Modifier.None! INSTANCE;
}
+ public interface ModifierScope extends androidx.ui.unit.Density {
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ property public abstract androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ }
+
public interface ParentDataModifier extends androidx.ui.core.Modifier.Element {
method public default Object? modifyParentData(androidx.ui.unit.Density, Object? parentData);
}
diff --git a/ui/ui-core/api/current.txt b/ui/ui-core/api/current.txt
index 76d92b7..14c238f 100644
--- a/ui/ui-core/api/current.txt
+++ b/ui/ui-core/api/current.txt
@@ -172,23 +172,30 @@
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
- method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public default androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
public interface Measurable extends androidx.ui.core.IntrinsicMeasurable {
method public androidx.ui.core.Placeable measure(androidx.ui.core.Constraints constraints);
}
- public abstract class MeasureScope implements androidx.ui.unit.Density {
+ public abstract class MeasureScope implements androidx.ui.core.ModifierScope {
ctor public MeasureScope();
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
method public final androidx.ui.core.MeasureScope.LayoutResult layout(androidx.ui.unit.IntPx width, androidx.ui.unit.IntPx height, java.util.Map<androidx.ui.core.AlignmentLine,androidx.ui.unit.IntPx> alignmentLines = emptyMap(), kotlin.jvm.functions.Function1<? super androidx.ui.core.Placeable.PlacementScope,kotlin.Unit> placementBlock);
+ method public void setAmbientLayoutDirection(androidx.ui.core.LayoutDirection p);
+ method public void setLayoutDirection(androidx.ui.core.LayoutDirection p);
+ property public androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public androidx.ui.core.LayoutDirection layoutDirection;
}
public static interface MeasureScope.LayoutResult {
@@ -222,6 +229,13 @@
field public static final androidx.ui.core.Modifier.None! INSTANCE;
}
+ public interface ModifierScope extends androidx.ui.unit.Density {
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ property public abstract androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ }
+
public interface ParentDataModifier extends androidx.ui.core.Modifier.Element {
method public default Object? modifyParentData(androidx.ui.unit.Density, Object? parentData);
}
diff --git a/ui/ui-core/api/public_plus_experimental_0.1.0-dev05.txt b/ui/ui-core/api/public_plus_experimental_0.1.0-dev05.txt
index 76d92b7..14c238f 100644
--- a/ui/ui-core/api/public_plus_experimental_0.1.0-dev05.txt
+++ b/ui/ui-core/api/public_plus_experimental_0.1.0-dev05.txt
@@ -172,23 +172,30 @@
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
- method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public default androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
public interface Measurable extends androidx.ui.core.IntrinsicMeasurable {
method public androidx.ui.core.Placeable measure(androidx.ui.core.Constraints constraints);
}
- public abstract class MeasureScope implements androidx.ui.unit.Density {
+ public abstract class MeasureScope implements androidx.ui.core.ModifierScope {
ctor public MeasureScope();
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
method public final androidx.ui.core.MeasureScope.LayoutResult layout(androidx.ui.unit.IntPx width, androidx.ui.unit.IntPx height, java.util.Map<androidx.ui.core.AlignmentLine,androidx.ui.unit.IntPx> alignmentLines = emptyMap(), kotlin.jvm.functions.Function1<? super androidx.ui.core.Placeable.PlacementScope,kotlin.Unit> placementBlock);
+ method public void setAmbientLayoutDirection(androidx.ui.core.LayoutDirection p);
+ method public void setLayoutDirection(androidx.ui.core.LayoutDirection p);
+ property public androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public androidx.ui.core.LayoutDirection layoutDirection;
}
public static interface MeasureScope.LayoutResult {
@@ -222,6 +229,13 @@
field public static final androidx.ui.core.Modifier.None! INSTANCE;
}
+ public interface ModifierScope extends androidx.ui.unit.Density {
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ property public abstract androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ }
+
public interface ParentDataModifier extends androidx.ui.core.Modifier.Element {
method public default Object? modifyParentData(androidx.ui.unit.Density, Object? parentData);
}
diff --git a/ui/ui-core/api/public_plus_experimental_current.txt b/ui/ui-core/api/public_plus_experimental_current.txt
index 76d92b7..14c238f 100644
--- a/ui/ui-core/api/public_plus_experimental_current.txt
+++ b/ui/ui-core/api/public_plus_experimental_current.txt
@@ -172,23 +172,30 @@
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
- method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public default androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
public interface Measurable extends androidx.ui.core.IntrinsicMeasurable {
method public androidx.ui.core.Placeable measure(androidx.ui.core.Constraints constraints);
}
- public abstract class MeasureScope implements androidx.ui.unit.Density {
+ public abstract class MeasureScope implements androidx.ui.core.ModifierScope {
ctor public MeasureScope();
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
method public final androidx.ui.core.MeasureScope.LayoutResult layout(androidx.ui.unit.IntPx width, androidx.ui.unit.IntPx height, java.util.Map<androidx.ui.core.AlignmentLine,androidx.ui.unit.IntPx> alignmentLines = emptyMap(), kotlin.jvm.functions.Function1<? super androidx.ui.core.Placeable.PlacementScope,kotlin.Unit> placementBlock);
+ method public void setAmbientLayoutDirection(androidx.ui.core.LayoutDirection p);
+ method public void setLayoutDirection(androidx.ui.core.LayoutDirection p);
+ property public androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public androidx.ui.core.LayoutDirection layoutDirection;
}
public static interface MeasureScope.LayoutResult {
@@ -222,6 +229,13 @@
field public static final androidx.ui.core.Modifier.None! INSTANCE;
}
+ public interface ModifierScope extends androidx.ui.unit.Density {
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ property public abstract androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ }
+
public interface ParentDataModifier extends androidx.ui.core.Modifier.Element {
method public default Object? modifyParentData(androidx.ui.unit.Density, Object? parentData);
}
diff --git a/ui/ui-core/api/restricted_0.1.0-dev05.txt b/ui/ui-core/api/restricted_0.1.0-dev05.txt
index 76d92b7..14c238f 100644
--- a/ui/ui-core/api/restricted_0.1.0-dev05.txt
+++ b/ui/ui-core/api/restricted_0.1.0-dev05.txt
@@ -172,23 +172,30 @@
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
- method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public default androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
public interface Measurable extends androidx.ui.core.IntrinsicMeasurable {
method public androidx.ui.core.Placeable measure(androidx.ui.core.Constraints constraints);
}
- public abstract class MeasureScope implements androidx.ui.unit.Density {
+ public abstract class MeasureScope implements androidx.ui.core.ModifierScope {
ctor public MeasureScope();
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
method public final androidx.ui.core.MeasureScope.LayoutResult layout(androidx.ui.unit.IntPx width, androidx.ui.unit.IntPx height, java.util.Map<androidx.ui.core.AlignmentLine,androidx.ui.unit.IntPx> alignmentLines = emptyMap(), kotlin.jvm.functions.Function1<? super androidx.ui.core.Placeable.PlacementScope,kotlin.Unit> placementBlock);
+ method public void setAmbientLayoutDirection(androidx.ui.core.LayoutDirection p);
+ method public void setLayoutDirection(androidx.ui.core.LayoutDirection p);
+ property public androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public androidx.ui.core.LayoutDirection layoutDirection;
}
public static interface MeasureScope.LayoutResult {
@@ -222,6 +229,13 @@
field public static final androidx.ui.core.Modifier.None! INSTANCE;
}
+ public interface ModifierScope extends androidx.ui.unit.Density {
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ property public abstract androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ }
+
public interface ParentDataModifier extends androidx.ui.core.Modifier.Element {
method public default Object? modifyParentData(androidx.ui.unit.Density, Object? parentData);
}
diff --git a/ui/ui-core/api/restricted_current.txt b/ui/ui-core/api/restricted_current.txt
index 76d92b7..14c238f 100644
--- a/ui/ui-core/api/restricted_current.txt
+++ b/ui/ui-core/api/restricted_current.txt
@@ -172,23 +172,30 @@
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
- method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public default androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public default androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public default androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public default androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public default androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public default androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public default androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
public interface Measurable extends androidx.ui.core.IntrinsicMeasurable {
method public androidx.ui.core.Placeable measure(androidx.ui.core.Constraints constraints);
}
- public abstract class MeasureScope implements androidx.ui.unit.Density {
+ public abstract class MeasureScope implements androidx.ui.core.ModifierScope {
ctor public MeasureScope();
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
method public final androidx.ui.core.MeasureScope.LayoutResult layout(androidx.ui.unit.IntPx width, androidx.ui.unit.IntPx height, java.util.Map<androidx.ui.core.AlignmentLine,androidx.ui.unit.IntPx> alignmentLines = emptyMap(), kotlin.jvm.functions.Function1<? super androidx.ui.core.Placeable.PlacementScope,kotlin.Unit> placementBlock);
+ method public void setAmbientLayoutDirection(androidx.ui.core.LayoutDirection p);
+ method public void setLayoutDirection(androidx.ui.core.LayoutDirection p);
+ property public androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public androidx.ui.core.LayoutDirection layoutDirection;
}
public static interface MeasureScope.LayoutResult {
@@ -222,6 +229,13 @@
field public static final androidx.ui.core.Modifier.None! INSTANCE;
}
+ public interface ModifierScope extends androidx.ui.unit.Density {
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ property public abstract androidx.ui.core.LayoutDirection ambientLayoutDirection;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ }
+
public interface ParentDataModifier extends androidx.ui.core.Modifier.Element {
method public default Object? modifyParentData(androidx.ui.unit.Density, Object? parentData);
}
diff --git a/ui/ui-core/src/main/java/androidx/ui/core/IntrinsicMeasurable.kt b/ui/ui-core/src/main/java/androidx/ui/core/IntrinsicMeasurable.kt
index 708bbcb..27a96b5 100644
--- a/ui/ui-core/src/main/java/androidx/ui/core/IntrinsicMeasurable.kt
+++ b/ui/ui-core/src/main/java/androidx/ui/core/IntrinsicMeasurable.kt
@@ -16,7 +16,6 @@
package androidx.ui.core
-import androidx.ui.unit.Density
import androidx.ui.unit.IntPx
/**
@@ -57,4 +56,4 @@
/**
* A function for performing intrinsic measurement.
*/
-typealias IntrinsicMeasureBlock = Density.(List<IntrinsicMeasurable>, IntPx) -> IntPx
+typealias IntrinsicMeasureBlock = ModifierScope.(List<IntrinsicMeasurable>, IntPx) -> IntPx
\ No newline at end of file
diff --git a/ui/ui-core/src/main/java/androidx/ui/core/LayoutModifier.kt b/ui/ui-core/src/main/java/androidx/ui/core/LayoutModifier.kt
index 4e87388..8fe1521 100644
--- a/ui/ui-core/src/main/java/androidx/ui/core/LayoutModifier.kt
+++ b/ui/ui-core/src/main/java/androidx/ui/core/LayoutModifier.kt
@@ -28,20 +28,20 @@
/**
* Modifies [constraints] for performing measurement of the modified layout element.
*/
- fun Density.modifyConstraints(constraints: Constraints): Constraints = constraints
+ fun ModifierScope.modifyConstraints(constraints: Constraints): Constraints = constraints
/**
* Returns the container size of a modified layout element given the original container
* measurement [constraints] and the measured [childSize].
*/
- fun Density.modifySize(constraints: Constraints, childSize: IntPxSize): IntPxSize =
+ fun ModifierScope.modifySize(constraints: Constraints, childSize: IntPxSize): IntPxSize =
childSize
/**
* Determines the modified minimum intrinsic width of [measurable].
* See [Measurable.minIntrinsicWidth].
*/
- fun Density.minIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx {
+ fun ModifierScope.minIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx {
val constraints = Constraints(maxHeight = height)
val layoutWidth = measurable.minIntrinsicWidth(modifyConstraints(constraints).maxHeight)
return modifySize(constraints, IntPxSize(layoutWidth, height)).width
@@ -51,7 +51,7 @@
* Determines the modified maximum intrinsic width of [measurable].
* See [Measurable.maxIntrinsicWidth].
*/
- fun Density.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx {
+ fun ModifierScope.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx {
val constraints = Constraints(maxHeight = height)
val layoutWidth = measurable.maxIntrinsicWidth(modifyConstraints(constraints).maxHeight)
return modifySize(constraints, IntPxSize(layoutWidth, height)).width
@@ -61,7 +61,7 @@
* Determines the modified minimum intrinsic height of [measurable].
* See [Measurable.minIntrinsicHeight].
*/
- fun Density.minIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx {
+ fun ModifierScope.minIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx {
val constraints = Constraints(maxWidth = width)
val layoutHeight = measurable.minIntrinsicHeight(modifyConstraints(constraints).maxWidth)
return modifySize(constraints, IntPxSize(width, layoutHeight)).height
@@ -71,7 +71,7 @@
* Determines the modified maximum intrinsic height of [measurable].
* See [Measurable.maxIntrinsicHeight].
*/
- fun Density.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx {
+ fun ModifierScope.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx {
val constraints = Constraints(maxWidth = width)
val layoutHeight = measurable.maxIntrinsicHeight(modifyConstraints(constraints).maxWidth)
return modifySize(constraints, IntPxSize(width, layoutHeight)).height
@@ -81,7 +81,7 @@
* Returns the position of a modified child of size [childSize] within a container of
* size [containerSize].
*/
- fun Density.modifyPosition(
+ fun ModifierScope.modifyPosition(
childSize: IntPxSize,
containerSize: IntPxSize
): IntPxPosition = IntPxPosition.Origin
@@ -89,8 +89,31 @@
/**
* Returns the modified position of [line] given its unmodified [value].
*/
- fun Density.modifyAlignmentLine(
+ fun ModifierScope.modifyAlignmentLine(
line: AlignmentLine,
value: IntPx?
): IntPx? = value
+
+ /**
+ * Modifies the layout direction to be used for measurement and layout by the modified layout
+ * node.
+ */
+ fun ModifierScope.modifyLayoutDirection(): LayoutDirection = layoutDirection
}
+
+/**
+ * Receiver scope for a layout modifier.
+ */
+interface ModifierScope : Density {
+
+ /**
+ * Layout direction set by layout modifier to force LTR or RTL direction in layout.
+ */
+ val layoutDirection: LayoutDirection
+
+ /**
+ * Layout direction provided through ambient. Unless modified through ambient, it reflects
+ * the locale's direction.
+ */
+ val ambientLayoutDirection: LayoutDirection
+}
\ No newline at end of file
diff --git a/ui/ui-core/src/main/java/androidx/ui/core/MeasureScope.kt b/ui/ui-core/src/main/java/androidx/ui/core/MeasureScope.kt
index 3652e0b..0e202e9 100644
--- a/ui/ui-core/src/main/java/androidx/ui/core/MeasureScope.kt
+++ b/ui/ui-core/src/main/java/androidx/ui/core/MeasureScope.kt
@@ -16,14 +16,13 @@
package androidx.ui.core
-import androidx.ui.unit.Density
import androidx.ui.unit.IntPx
/**
* The receiver scope of a layout's measure lambda. The return value of the
* measure lambda is [LayoutResult], which should be returned by [layout]
*/
-abstract class MeasureScope : Density {
+abstract class MeasureScope : ModifierScope {
/**
* Interface holding the size and alignment lines of the measured layout, as well as the
* children positioning logic.
@@ -67,9 +66,16 @@
override fun placeChildren(placementScope: Placeable.PlacementScope) =
placementScope.placementBlock()
}
+
+ // Value comes from the ambient. Needed to provide an API that allows to restore the
+ // modified layout direction to ambient's state.
+ override var ambientLayoutDirection = LayoutDirection.Ltr
+
+ // Stores the layout direction of the node that can be updated through the layout modifier.
+ override var layoutDirection = LayoutDirection.Ltr
}
/**
* A function for performing layout measurement.
*/
-typealias MeasureBlock = MeasureScope.(List<Measurable>, Constraints) -> MeasureScope.LayoutResult
+typealias MeasureBlock = MeasureScope.(List<Measurable>, Constraints) -> MeasureScope.LayoutResult
\ No newline at end of file
diff --git a/ui/ui-framework/api/0.1.0-dev05.txt b/ui/ui-framework/api/0.1.0-dev05.txt
index 80001c22c..a56d7d8 100644
--- a/ui/ui-framework/api/0.1.0-dev05.txt
+++ b/ui/ui-framework/api/0.1.0-dev05.txt
@@ -23,7 +23,7 @@
}
public final class LayoutKt {
- method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
+ method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method @Deprecated public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit>![] childrenArray, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super androidx.ui.core.MultiComposableMeasurables,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
diff --git a/ui/ui-framework/api/current.txt b/ui/ui-framework/api/current.txt
index 80001c22c..a56d7d8 100644
--- a/ui/ui-framework/api/current.txt
+++ b/ui/ui-framework/api/current.txt
@@ -23,7 +23,7 @@
}
public final class LayoutKt {
- method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
+ method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method @Deprecated public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit>![] childrenArray, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super androidx.ui.core.MultiComposableMeasurables,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
diff --git a/ui/ui-framework/api/public_plus_experimental_0.1.0-dev05.txt b/ui/ui-framework/api/public_plus_experimental_0.1.0-dev05.txt
index 80001c22c..a56d7d8 100644
--- a/ui/ui-framework/api/public_plus_experimental_0.1.0-dev05.txt
+++ b/ui/ui-framework/api/public_plus_experimental_0.1.0-dev05.txt
@@ -23,7 +23,7 @@
}
public final class LayoutKt {
- method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
+ method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method @Deprecated public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit>![] childrenArray, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super androidx.ui.core.MultiComposableMeasurables,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
diff --git a/ui/ui-framework/api/public_plus_experimental_current.txt b/ui/ui-framework/api/public_plus_experimental_current.txt
index 80001c22c..a56d7d8 100644
--- a/ui/ui-framework/api/public_plus_experimental_current.txt
+++ b/ui/ui-framework/api/public_plus_experimental_current.txt
@@ -23,7 +23,7 @@
}
public final class LayoutKt {
- method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
+ method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method @Deprecated public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit>![] childrenArray, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super androidx.ui.core.MultiComposableMeasurables,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
diff --git a/ui/ui-framework/api/restricted_0.1.0-dev05.txt b/ui/ui-framework/api/restricted_0.1.0-dev05.txt
index 80001c22c..a56d7d8 100644
--- a/ui/ui-framework/api/restricted_0.1.0-dev05.txt
+++ b/ui/ui-framework/api/restricted_0.1.0-dev05.txt
@@ -23,7 +23,7 @@
}
public final class LayoutKt {
- method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
+ method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method @Deprecated public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit>![] childrenArray, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super androidx.ui.core.MultiComposableMeasurables,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
diff --git a/ui/ui-framework/api/restricted_current.txt b/ui/ui-framework/api/restricted_current.txt
index 80001c22c..a56d7d8 100644
--- a/ui/ui-framework/api/restricted_current.txt
+++ b/ui/ui-framework/api/restricted_current.txt
@@ -23,7 +23,7 @@
}
public final class LayoutKt {
- method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.unit.Density,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
+ method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> minIntrinsicHeightMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicWidthMeasureBlock, kotlin.jvm.functions.Function3<? super androidx.ui.core.ModifierScope,? super java.util.List<? extends androidx.ui.core.IntrinsicMeasurable>,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> maxIntrinsicHeightMeasureBlock, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit> children, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method @Deprecated public static void Layout(kotlin.jvm.functions.Function0<kotlin.Unit>![] childrenArray, androidx.ui.core.Modifier modifier = Modifier.None, kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super androidx.ui.core.MultiComposableMeasurables,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function3<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? extends androidx.ui.core.MeasureScope.LayoutResult> measureBlock);
diff --git a/ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidLayoutDrawTest.kt b/ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidLayoutDrawTest.kt
index a9fffc3..bd9df27 100644
--- a/ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidLayoutDrawTest.kt
+++ b/ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidLayoutDrawTest.kt
@@ -43,9 +43,12 @@
import androidx.ui.core.DrawModifier
import androidx.ui.core.HorizontalAlignmentLine
import androidx.ui.core.Layout
+import androidx.ui.core.LayoutDirection
+import androidx.ui.core.LayoutDirectionAmbient
import androidx.ui.core.LayoutModifier
import androidx.ui.core.LayoutTag
import androidx.ui.core.Measurable
+import androidx.ui.core.ModifierScope
import androidx.ui.core.Modifier
import androidx.ui.core.OnPositioned
import androidx.ui.core.ParentData
@@ -471,6 +474,7 @@
Providers(
ContextAmbient provides this,
DensityAmbient provides Density(this),
+ LayoutDirectionAmbient provides LayoutDirection.Ltr,
children = composable
)
}
@@ -2068,9 +2072,9 @@
}
private val AlignTopLeft = object : LayoutModifier {
- override fun Density.modifyConstraints(constraints: Constraints) =
+ override fun ModifierScope.modifyConstraints(constraints: Constraints) =
constraints.copy(minWidth = 0.ipx, minHeight = 0.ipx)
- override fun Density.modifySize(
+ override fun ModifierScope.modifySize(
constraints: Constraints,
childSize: IntPxSize
) = IntPxSize(constraints.maxWidth, constraints.maxHeight)
@@ -2526,30 +2530,30 @@
val bottom: IntPx = 0.ipx
) : LayoutModifier {
- override fun Density.minIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx =
+ override fun ModifierScope.minIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx =
measurable.minIntrinsicWidth((height - (top + bottom)).coerceAtLeast(0.ipx)) +
(left + right)
- override fun Density.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx =
+ override fun ModifierScope.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx =
measurable.maxIntrinsicWidth((height - (top + bottom)).coerceAtLeast(0.ipx)) +
(left + right)
- override fun Density.minIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx =
+ override fun ModifierScope.minIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx =
measurable.minIntrinsicHeight((width - (left + right)).coerceAtLeast(0.ipx)) +
(top + bottom)
- override fun Density.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx =
+ override fun ModifierScope.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx =
measurable.maxIntrinsicHeight((width - (left + right)).coerceAtLeast(0.ipx)) +
(top + bottom)
- override fun Density.modifyConstraints(
+ override fun ModifierScope.modifyConstraints(
constraints: Constraints
) = constraints.offset(
horizontal = -left - right,
vertical = -top - bottom
)
- override fun Density.modifySize(
+ override fun ModifierScope.modifySize(
constraints: Constraints,
childSize: IntPxSize
) = IntPxSize(
@@ -2559,7 +2563,7 @@
.coerceIn(constraints.minHeight, constraints.maxHeight)
)
- override fun Density.modifyPosition(
+ override fun ModifierScope.modifyPosition(
childSize: IntPxSize,
containerSize: IntPxSize
) = IntPxPosition(left, top)
@@ -2670,7 +2674,7 @@
paint.style = PaintingStyle.fill
}
- override fun Density.modifyPosition(
+ override fun ModifierScope.modifyPosition(
childSize: IntPxSize,
containerSize: IntPxSize
): IntPxPosition {
@@ -2680,11 +2684,11 @@
)
}
- override fun Density.modifyConstraints(constraints: Constraints): Constraints {
+ override fun ModifierScope.modifyConstraints(constraints: Constraints): Constraints {
return Constraints.fixed(10.ipx, 10.ipx)
}
- override fun Density.modifySize(
+ override fun ModifierScope.modifySize(
constraints: Constraints,
childSize: IntPxSize
): IntPxSize {
diff --git a/ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidViewCompatTest.kt b/ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidViewCompatTest.kt
index fe32670..7e11cf7 100644
--- a/ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidViewCompatTest.kt
+++ b/ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidViewCompatTest.kt
@@ -37,6 +37,7 @@
import androidx.ui.core.Constraints
import androidx.ui.core.Layout
import androidx.ui.core.LayoutModifier
+import androidx.ui.core.ModifierScope
import androidx.ui.core.Modifier
import androidx.ui.core.Ref
import androidx.ui.core.RepaintBoundary
@@ -49,7 +50,6 @@
import androidx.ui.test.captureToBitmap
import androidx.ui.test.createComposeRule
import androidx.ui.test.findByTag
-import androidx.ui.unit.Density
import androidx.ui.unit.IntPxPosition
import androidx.ui.unit.ipx
import junit.framework.TestCase.assertNotNull
@@ -369,7 +369,7 @@
}
fun LayoutConstraints(childConstraints: Constraints) = object : LayoutModifier {
- override fun Density.modifyConstraints(constraints: Constraints): Constraints {
+ override fun ModifierScope.modifyConstraints(constraints: Constraints): Constraints {
return childConstraints
}
}
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/Layout.kt b/ui/ui-framework/src/main/java/androidx/ui/core/Layout.kt
index 76453f3..d9da94c 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/Layout.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/Layout.kt
@@ -87,25 +87,25 @@
constraints: Constraints
) = measureScope.measureBlock(measurables, constraints)
override fun minIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
- ) = density.minIntrinsicWidthMeasureBlock(measurables, h)
+ ) = modifierScope.minIntrinsicWidthMeasureBlock(measurables, h)
override fun minIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
- ) = density.minIntrinsicHeightMeasureBlock(measurables, w)
+ ) = modifierScope.minIntrinsicHeightMeasureBlock(measurables, w)
override fun maxIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
- ) = density.maxIntrinsicWidthMeasureBlock(measurables, h)
+ ) = modifierScope.maxIntrinsicWidthMeasureBlock(measurables, h)
override fun maxIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
- ) = density.maxIntrinsicHeightMeasureBlock(measurables, w)
+ ) = modifierScope.maxIntrinsicHeightMeasureBlock(measurables, w)
}
Layout(children, measureBlocks, modifier)
}
@@ -151,7 +151,12 @@
measureBlocks: LayoutNode.MeasureBlocks,
modifier: Modifier
) {
- LayoutNode(modifier = modifier, measureBlocks = measureBlocks) {
+ val layoutDirection = LayoutDirectionAmbient.current
+ LayoutNode(
+ modifier = modifier,
+ measureBlocks = measureBlocks,
+ ambientLayoutDirection = layoutDirection
+ ) {
children()
}
}
@@ -252,25 +257,25 @@
constraints: Constraints
) = measureScope.measureBlock(measurables, constraints)
override fun minIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
- ) = density.MeasuringMinIntrinsicWidth(measureBlock, measurables, h)
+ ) = modifierScope.MeasuringMinIntrinsicWidth(measureBlock, measurables, h)
override fun minIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
- ) = density.MeasuringMinIntrinsicHeight(measureBlock, measurables, w)
+ ) = modifierScope.MeasuringMinIntrinsicHeight(measureBlock, measurables, w)
override fun maxIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
- ) = density.MeasuringMaxIntrinsicWidth(measureBlock, measurables, h)
+ ) = modifierScope.MeasuringMaxIntrinsicWidth(measureBlock, measurables, h)
override fun maxIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
- ) = density.MeasuringMaxIntrinsicHeight(measureBlock, measurables, w)
+ ) = modifierScope.MeasuringMaxIntrinsicHeight(measureBlock, measurables, w)
override fun toString(): String {
// this calls simpleIdentityToString on measureBlock because it is typically a lambda,
diff --git a/ui/ui-layout/api/0.1.0-dev05.txt b/ui/ui-layout/api/0.1.0-dev05.txt
index 37117a4..e2d2f51 100644
--- a/ui/ui-layout/api/0.1.0-dev05.txt
+++ b/ui/ui-layout/api/0.1.0-dev05.txt
@@ -178,11 +178,11 @@
method public float component1();
method public androidx.ui.layout.LayoutAspectRatio copy(float aspectRatio);
method public float getAspectRatio();
- method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
}
public final class LayoutGravity {
@@ -196,9 +196,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -212,15 +213,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutHeight.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutHeight.Fill! INSTANCE;
}
@@ -231,9 +233,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -245,9 +248,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -264,9 +268,9 @@
method public androidx.ui.unit.Dp getLeft();
method public androidx.ui.unit.Dp getRight();
method public androidx.ui.unit.Dp getTop();
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
@kotlin.DslMarker public @interface LayoutScopeMarker {
@@ -282,9 +286,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -303,15 +308,16 @@
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutSize.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutSize.Fill! INSTANCE;
}
@@ -325,9 +331,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -342,9 +349,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -356,9 +364,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -372,15 +381,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutWidth.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutWidth.Fill! INSTANCE;
}
@@ -391,9 +401,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -405,9 +416,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
diff --git a/ui/ui-layout/api/current.txt b/ui/ui-layout/api/current.txt
index 37117a4..e2d2f51 100644
--- a/ui/ui-layout/api/current.txt
+++ b/ui/ui-layout/api/current.txt
@@ -178,11 +178,11 @@
method public float component1();
method public androidx.ui.layout.LayoutAspectRatio copy(float aspectRatio);
method public float getAspectRatio();
- method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
}
public final class LayoutGravity {
@@ -196,9 +196,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -212,15 +213,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutHeight.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutHeight.Fill! INSTANCE;
}
@@ -231,9 +233,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -245,9 +248,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -264,9 +268,9 @@
method public androidx.ui.unit.Dp getLeft();
method public androidx.ui.unit.Dp getRight();
method public androidx.ui.unit.Dp getTop();
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
@kotlin.DslMarker public @interface LayoutScopeMarker {
@@ -282,9 +286,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -303,15 +308,16 @@
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutSize.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutSize.Fill! INSTANCE;
}
@@ -325,9 +331,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -342,9 +349,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -356,9 +364,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -372,15 +381,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutWidth.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutWidth.Fill! INSTANCE;
}
@@ -391,9 +401,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -405,9 +416,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
diff --git a/ui/ui-layout/api/public_plus_experimental_0.1.0-dev05.txt b/ui/ui-layout/api/public_plus_experimental_0.1.0-dev05.txt
index 37117a4..e2d2f51 100644
--- a/ui/ui-layout/api/public_plus_experimental_0.1.0-dev05.txt
+++ b/ui/ui-layout/api/public_plus_experimental_0.1.0-dev05.txt
@@ -178,11 +178,11 @@
method public float component1();
method public androidx.ui.layout.LayoutAspectRatio copy(float aspectRatio);
method public float getAspectRatio();
- method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
}
public final class LayoutGravity {
@@ -196,9 +196,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -212,15 +213,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutHeight.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutHeight.Fill! INSTANCE;
}
@@ -231,9 +233,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -245,9 +248,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -264,9 +268,9 @@
method public androidx.ui.unit.Dp getLeft();
method public androidx.ui.unit.Dp getRight();
method public androidx.ui.unit.Dp getTop();
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
@kotlin.DslMarker public @interface LayoutScopeMarker {
@@ -282,9 +286,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -303,15 +308,16 @@
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutSize.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutSize.Fill! INSTANCE;
}
@@ -325,9 +331,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -342,9 +349,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -356,9 +364,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -372,15 +381,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutWidth.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutWidth.Fill! INSTANCE;
}
@@ -391,9 +401,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -405,9 +416,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
diff --git a/ui/ui-layout/api/public_plus_experimental_current.txt b/ui/ui-layout/api/public_plus_experimental_current.txt
index 37117a4..e2d2f51 100644
--- a/ui/ui-layout/api/public_plus_experimental_current.txt
+++ b/ui/ui-layout/api/public_plus_experimental_current.txt
@@ -178,11 +178,11 @@
method public float component1();
method public androidx.ui.layout.LayoutAspectRatio copy(float aspectRatio);
method public float getAspectRatio();
- method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
}
public final class LayoutGravity {
@@ -196,9 +196,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -212,15 +213,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutHeight.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutHeight.Fill! INSTANCE;
}
@@ -231,9 +233,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -245,9 +248,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -264,9 +268,9 @@
method public androidx.ui.unit.Dp getLeft();
method public androidx.ui.unit.Dp getRight();
method public androidx.ui.unit.Dp getTop();
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
@kotlin.DslMarker public @interface LayoutScopeMarker {
@@ -282,9 +286,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -303,15 +308,16 @@
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutSize.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutSize.Fill! INSTANCE;
}
@@ -325,9 +331,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -342,9 +349,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -356,9 +364,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -372,15 +381,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutWidth.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutWidth.Fill! INSTANCE;
}
@@ -391,9 +401,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -405,9 +416,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
diff --git a/ui/ui-layout/api/restricted_0.1.0-dev05.txt b/ui/ui-layout/api/restricted_0.1.0-dev05.txt
index 37117a4..e2d2f51 100644
--- a/ui/ui-layout/api/restricted_0.1.0-dev05.txt
+++ b/ui/ui-layout/api/restricted_0.1.0-dev05.txt
@@ -178,11 +178,11 @@
method public float component1();
method public androidx.ui.layout.LayoutAspectRatio copy(float aspectRatio);
method public float getAspectRatio();
- method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
}
public final class LayoutGravity {
@@ -196,9 +196,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -212,15 +213,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutHeight.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutHeight.Fill! INSTANCE;
}
@@ -231,9 +233,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -245,9 +248,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -264,9 +268,9 @@
method public androidx.ui.unit.Dp getLeft();
method public androidx.ui.unit.Dp getRight();
method public androidx.ui.unit.Dp getTop();
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
@kotlin.DslMarker public @interface LayoutScopeMarker {
@@ -282,9 +286,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -303,15 +308,16 @@
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutSize.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutSize.Fill! INSTANCE;
}
@@ -325,9 +331,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -342,9 +349,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -356,9 +364,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -372,15 +381,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutWidth.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutWidth.Fill! INSTANCE;
}
@@ -391,9 +401,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -405,9 +416,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
diff --git a/ui/ui-layout/api/restricted_current.txt b/ui/ui-layout/api/restricted_current.txt
index 37117a4..e2d2f51 100644
--- a/ui/ui-layout/api/restricted_current.txt
+++ b/ui/ui-layout/api/restricted_current.txt
@@ -178,11 +178,11 @@
method public float component1();
method public androidx.ui.layout.LayoutAspectRatio copy(float aspectRatio);
method public float getAspectRatio();
- method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
- method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.unit.Density, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.unit.IntPx minIntrinsicHeightOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx width);
+ method public androidx.ui.unit.IntPx minIntrinsicWidthOf(androidx.ui.core.ModifierScope, androidx.ui.core.Measurable measurable, androidx.ui.unit.IntPx height);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
}
public final class LayoutGravity {
@@ -196,9 +196,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -212,15 +213,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutHeight.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutHeight.Fill! INSTANCE;
}
@@ -231,9 +233,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -245,9 +248,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -264,9 +268,9 @@
method public androidx.ui.unit.Dp getLeft();
method public androidx.ui.unit.Dp getRight();
method public androidx.ui.unit.Dp getTop();
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
}
@kotlin.DslMarker public @interface LayoutScopeMarker {
@@ -282,9 +286,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getHeight();
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -303,15 +308,16 @@
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutSize.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutSize.Fill! INSTANCE;
}
@@ -325,9 +331,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxHeight();
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -342,9 +349,10 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinHeight();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -356,9 +364,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -372,15 +381,16 @@
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
public static final class LayoutWidth.Fill implements androidx.ui.core.LayoutModifier {
- method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints);
+ method public androidx.ui.core.Constraints modifyConstraints(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints);
field public static final androidx.ui.layout.LayoutWidth.Fill! INSTANCE;
}
@@ -391,9 +401,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMaxWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
@@ -405,9 +416,10 @@
method public <R> R! foldIn(R! initial, kotlin.jvm.functions.Function2<? super R,? super androidx.ui.core.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R! initial, kotlin.jvm.functions.Function2<? super androidx.ui.core.Modifier.Element,? super R,? extends R> operation);
method public androidx.ui.unit.Dp getMinWidth();
- method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.unit.Density, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
- method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.unit.Density, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
- method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.unit.Density, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
+ method public androidx.ui.unit.IntPx? modifyAlignmentLine(androidx.ui.core.ModifierScope, androidx.ui.core.AlignmentLine line, androidx.ui.unit.IntPx? value);
+ method public androidx.ui.core.LayoutDirection modifyLayoutDirection(androidx.ui.core.ModifierScope);
+ method public androidx.ui.unit.IntPxPosition modifyPosition(androidx.ui.core.ModifierScope, androidx.ui.unit.IntPxSize childSize, androidx.ui.unit.IntPxSize containerSize);
+ method public androidx.ui.unit.IntPxSize modifySize(androidx.ui.core.ModifierScope, androidx.ui.core.Constraints constraints, androidx.ui.unit.IntPxSize childSize);
method public androidx.ui.core.Modifier plus(androidx.ui.core.Modifier other);
method @Deprecated public androidx.ui.core.Modifier wraps(androidx.ui.core.Modifier other);
}
diff --git a/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/LayoutDirectionModifierTest.kt b/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/LayoutDirectionModifierTest.kt
new file mode 100644
index 0000000..34e4a9f
--- /dev/null
+++ b/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/LayoutDirectionModifierTest.kt
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.ui.layout.test
+
+import androidx.compose.Composable
+import androidx.compose.Providers
+import androidx.test.filters.SmallTest
+import androidx.ui.core.Layout
+import androidx.ui.core.LayoutDirectionAmbient
+import androidx.ui.core.LayoutModifier
+import androidx.ui.core.ModifierScope
+import androidx.ui.core.Ref
+import androidx.ui.layout.Container
+import androidx.ui.layout.LayoutDirectionModifier
+import androidx.ui.layout.MaxIntrinsicWidth
+import androidx.ui.layout.Stack
+import androidx.ui.unit.IntPxPosition
+import androidx.ui.unit.IntPxSize
+import androidx.ui.unit.ipx
+import org.junit.Assert.assertNotNull
+import org.junit.Assert.assertTrue
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.TimeUnit
+
+@SmallTest
+@RunWith(JUnit4::class)
+class LayoutDirectionModifierTest : LayoutTest() {
+
+ @Test
+ fun testModifiedLayoutDirection_inMeasureScope() {
+ val latch = CountDownLatch(1)
+ val layoutDirection = Ref<androidx.ui.core.LayoutDirection>()
+ val children = @Composable {
+ Layout(
+ children = @Composable() {},
+ modifier = LayoutDirectionModifier.Rtl
+ ) { _, _ ->
+ layoutDirection.value = this.layoutDirection
+ latch.countDown()
+ layout(0.ipx, 0.ipx) {}
+ }
+ }
+ show {
+ Providers(
+ LayoutDirectionAmbient provides androidx.ui.core.LayoutDirection.Ltr,
+ children = children
+ )
+ children()
+ }
+
+ assertTrue(latch.await(1, TimeUnit.SECONDS))
+ assertTrue(androidx.ui.core.LayoutDirection.Rtl == layoutDirection.value)
+ }
+
+ @Test
+ fun testModifiedLayoutDirection_inIntrinsicsMeasure() {
+ val latch = CountDownLatch(1)
+ var layoutDirection: androidx.ui.core.LayoutDirection? = null
+ val children = @Composable {
+ MaxIntrinsicWidth {
+ Layout(
+ children = @Composable() {},
+ modifier = LayoutDirectionModifier.Rtl,
+ minIntrinsicWidthMeasureBlock = { _, _ -> 0.ipx },
+ minIntrinsicHeightMeasureBlock = { _, _ -> 0.ipx },
+ maxIntrinsicWidthMeasureBlock = { _, _ ->
+ layoutDirection = this.layoutDirection
+ latch.countDown()
+ 0.ipx
+ },
+ maxIntrinsicHeightMeasureBlock = { _, _ -> 0.ipx }
+ ) { _, _ ->
+ layout(0.ipx, 0.ipx) {}
+ }
+ }
+ }
+
+ show {
+ Providers(
+ LayoutDirectionAmbient provides androidx.ui.core.LayoutDirection.Ltr,
+ children = children
+ )
+ children()
+ }
+
+ assertTrue(latch.await(1, TimeUnit.SECONDS))
+ assertNotNull(layoutDirection)
+ assertTrue(androidx.ui.core.LayoutDirection.Rtl == layoutDirection!!)
+ }
+
+ @Test
+ fun testModifiedLayoutDirection_insideModifier() {
+ val latch = CountDownLatch(1)
+ var layoutDirection: androidx.ui.core.LayoutDirection? = null
+ val rtlAwareModifier = object : LayoutModifier {
+ override fun ModifierScope.modifyPosition(
+ childSize: IntPxSize,
+ containerSize: IntPxSize
+ ): IntPxPosition {
+ layoutDirection = this.layoutDirection
+ latch.countDown()
+ return if (this.layoutDirection == androidx.ui.core.LayoutDirection.Ltr) {
+ IntPxPosition.Origin
+ } else {
+ IntPxPosition(containerSize.width - childSize.width, 0.ipx)
+ }
+ }
+ }
+ val children = @Composable {
+ Stack {
+ Container(modifier = LayoutDirectionModifier.Rtl + rtlAwareModifier) {}
+ }
+ }
+
+ show {
+ Providers(
+ LayoutDirectionAmbient provides androidx.ui.core.LayoutDirection.Ltr,
+ children = children
+ )
+ children()
+ }
+
+ assertTrue(latch.await(1, TimeUnit.SECONDS))
+ assertNotNull(layoutDirection)
+ assertTrue(androidx.ui.core.LayoutDirection.Rtl == layoutDirection!!)
+ }
+
+ @Test
+ fun testRestoreLayoutDirection() {
+ val latch = CountDownLatch(1)
+ var layoutDirection: androidx.ui.core.LayoutDirection? = null
+ val children = @Composable {
+ Layout(
+ children = @Composable() {},
+ modifier = LayoutDirectionModifier.Rtl + LayoutDirectionModifier.Restore
+ ) { _, _ ->
+ layoutDirection = this.layoutDirection
+ latch.countDown()
+ layout(0.ipx, 0.ipx) {}
+ }
+ }
+
+ show {
+ Providers(
+ LayoutDirectionAmbient provides androidx.ui.core.LayoutDirection.Ltr,
+ children = children
+ )
+ children()
+ }
+
+ assertTrue(latch.await(1, TimeUnit.SECONDS))
+ assertNotNull(layoutDirection)
+ assertTrue(androidx.ui.core.LayoutDirection.Ltr == layoutDirection!!)
+ }
+}
\ No newline at end of file
diff --git a/ui/ui-layout/src/main/java/androidx/ui/layout/Align.kt b/ui/ui-layout/src/main/java/androidx/ui/layout/Align.kt
index d990b52..72f57a3 100644
--- a/ui/ui-layout/src/main/java/androidx/ui/layout/Align.kt
+++ b/ui/ui-layout/src/main/java/androidx/ui/layout/Align.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.Constraints
import androidx.ui.core.Layout
import androidx.ui.core.LayoutModifier
-import androidx.ui.unit.Density
+import androidx.ui.core.ModifierScope
import androidx.ui.unit.IntPxPosition
import androidx.ui.unit.IntPxSize
import androidx.ui.unit.ipx
@@ -230,13 +230,13 @@
private val alignment: Alignment,
private val direction: Direction
) : LayoutModifier {
- override fun Density.modifyConstraints(constraints: Constraints) = when (direction) {
+ override fun ModifierScope.modifyConstraints(constraints: Constraints) = when (direction) {
Direction.Both -> constraints.copy(minWidth = 0.ipx, minHeight = 0.ipx)
Direction.Horizontal -> constraints.copy(minWidth = 0.ipx)
Direction.Vertical -> constraints.copy(minHeight = 0.ipx)
}
- override fun Density.modifySize(
+ override fun ModifierScope.modifySize(
constraints: Constraints,
childSize: IntPxSize
): IntPxSize = IntPxSize(
@@ -244,7 +244,7 @@
max(constraints.minHeight, childSize.height)
)
- override fun Density.modifyPosition(
+ override fun ModifierScope.modifyPosition(
childSize: IntPxSize,
containerSize: IntPxSize
): IntPxPosition = alignment.align(
diff --git a/ui/ui-layout/src/main/java/androidx/ui/layout/AspectRatio.kt b/ui/ui-layout/src/main/java/androidx/ui/layout/AspectRatio.kt
index fe5f490..e4fceca 100644
--- a/ui/ui-layout/src/main/java/androidx/ui/layout/AspectRatio.kt
+++ b/ui/ui-layout/src/main/java/androidx/ui/layout/AspectRatio.kt
@@ -20,8 +20,8 @@
import androidx.ui.core.Constraints
import androidx.ui.core.LayoutModifier
import androidx.ui.core.Measurable
+import androidx.ui.core.ModifierScope
import androidx.ui.core.satisfiedBy
-import androidx.ui.unit.Density
import androidx.ui.unit.IntPx
import androidx.ui.unit.IntPxSize
import androidx.ui.unit.ipx
@@ -53,7 +53,7 @@
require(aspectRatio > 0) { "aspectRatio $aspectRatio must be > 0" }
}
- override fun Density.modifyConstraints(constraints: Constraints): Constraints {
+ override fun ModifierScope.modifyConstraints(constraints: Constraints): Constraints {
val size = constraints.findSizeWith(aspectRatio)
return if (size != null)
Constraints.fixed(size.width, size.height)
@@ -61,22 +61,22 @@
constraints
}
- override fun Density.minIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx {
+ override fun ModifierScope.minIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx {
return if (height == IntPx.Infinity) measurable.minIntrinsicWidth(height)
else height * aspectRatio
}
- override fun Density.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx {
+ override fun ModifierScope.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx {
return if (height == IntPx.Infinity) measurable.maxIntrinsicWidth(height)
else height * aspectRatio
}
- override fun Density.minIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx {
+ override fun ModifierScope.minIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx {
return if (width == IntPx.Infinity) measurable.minIntrinsicHeight(width)
else width / aspectRatio
}
- override fun Density.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx {
+ override fun ModifierScope.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx {
return if (width == IntPx.Infinity) measurable.maxIntrinsicHeight(width)
else width / aspectRatio
}
diff --git a/ui/ui-layout/src/main/java/androidx/ui/layout/ConstraintLayout.kt b/ui/ui-layout/src/main/java/androidx/ui/layout/ConstraintLayout.kt
index aac06c1..2d35bf6 100644
--- a/ui/ui-layout/src/main/java/androidx/ui/layout/ConstraintLayout.kt
+++ b/ui/ui-layout/src/main/java/androidx/ui/layout/ConstraintLayout.kt
@@ -34,6 +34,7 @@
import androidx.ui.core.Layout
import androidx.ui.core.LayoutModifier
import androidx.ui.core.Measurable
+import androidx.ui.core.ModifierScope
import androidx.ui.core.ParentDataModifier
import androidx.ui.core.Placeable
import androidx.ui.core.Placeable.PlacementScope.place
@@ -658,16 +659,17 @@
}
private data class TagModifier(val tag: Any) : LayoutModifier, ParentDataModifier {
- override fun Density.modifyConstraints(constraints: Constraints) = constraints
- override fun Density.modifySize(constraints: Constraints, childSize: IntPxSize) = childSize
- override fun Density.minIntrinsicWidthOf(measurable: Measurable, height: IntPx) =
+ override fun ModifierScope.modifyConstraints(constraints: Constraints) = constraints
+ override fun ModifierScope.modifySize(constraints: Constraints, childSize: IntPxSize) =
+ childSize
+ override fun ModifierScope.minIntrinsicWidthOf(measurable: Measurable, height: IntPx) =
measurable.minIntrinsicWidth(height)
- override fun Density.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx) =
+ override fun ModifierScope.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx) =
measurable.maxIntrinsicWidth(height)
- override fun Density.minIntrinsicHeightOf(measurable: Measurable, width: IntPx) =
+ override fun ModifierScope.minIntrinsicHeightOf(measurable: Measurable, width: IntPx) =
measurable.minIntrinsicHeight(width)
- override fun Density.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx) =
+ override fun ModifierScope.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx) =
measurable.maxIntrinsicHeight(width)
- override fun Density.modifyAlignmentLine(line: AlignmentLine, value: IntPx?) = value
+ override fun ModifierScope.modifyAlignmentLine(line: AlignmentLine, value: IntPx?) = value
override fun Density.modifyParentData(parentData: Any?) = this@TagModifier
}
diff --git a/ui/ui-layout/src/main/java/androidx/ui/layout/LayoutDirections.kt b/ui/ui-layout/src/main/java/androidx/ui/layout/LayoutDirections.kt
new file mode 100644
index 0000000..53b7748
--- /dev/null
+++ b/ui/ui-layout/src/main/java/androidx/ui/layout/LayoutDirections.kt
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.ui.layout
+
+import androidx.ui.core.LayoutDirection
+import androidx.ui.core.LayoutModifier
+import androidx.ui.core.ModifierScope
+
+/**
+ * A layout modifier that changes the layout direction of the corresponding layout node.
+ */
+// TODO(soboleva) Make a public API
+internal object LayoutDirectionModifier {
+ val Ltr: LayoutModifier = LayoutDirectionModifierImpl(LayoutDirection.Ltr)
+ val Rtl: LayoutModifier = LayoutDirectionModifierImpl(LayoutDirection.Rtl)
+ val Restore: LayoutModifier = LayoutDirectionModifierImpl(null)
+}
+
+private data class LayoutDirectionModifierImpl(
+ val newLayoutDirection: LayoutDirection?
+) : LayoutModifier {
+ // if newLayoutDirection set by modifier is null, then we restore to ambient's layout direction
+ override fun ModifierScope.modifyLayoutDirection() =
+ newLayoutDirection ?: ambientLayoutDirection
+}
diff --git a/ui/ui-layout/src/main/java/androidx/ui/layout/Padding.kt b/ui/ui-layout/src/main/java/androidx/ui/layout/Padding.kt
index 01168a5..ace79e0 100644
--- a/ui/ui-layout/src/main/java/androidx/ui/layout/Padding.kt
+++ b/ui/ui-layout/src/main/java/androidx/ui/layout/Padding.kt
@@ -19,8 +19,8 @@
import androidx.compose.Immutable
import androidx.ui.core.Constraints
import androidx.ui.core.LayoutModifier
+import androidx.ui.core.ModifierScope
import androidx.ui.core.offset
-import androidx.ui.unit.Density
import androidx.ui.unit.Dp
import androidx.ui.unit.IntPxPosition
import androidx.ui.unit.IntPxSize
@@ -52,14 +52,14 @@
val right: Dp = 0.dp,
val bottom: Dp = 0.dp
) : LayoutModifier {
- override fun Density.modifyConstraints(
+ override fun ModifierScope.modifyConstraints(
constraints: Constraints
) = constraints.offset(
horizontal = -left.toIntPx() - right.toIntPx(),
vertical = -top.toIntPx() - bottom.toIntPx()
)
- override fun Density.modifySize(
+ override fun ModifierScope.modifySize(
constraints: Constraints,
childSize: IntPxSize
) = IntPxSize(
@@ -69,7 +69,7 @@
.coerceIn(constraints.minHeight, constraints.maxHeight)
)
- override fun Density.modifyPosition(
+ override fun ModifierScope.modifyPosition(
childSize: IntPxSize,
containerSize: IntPxSize
) = IntPxPosition(left.toIntPx(), top.toIntPx())
diff --git a/ui/ui-layout/src/main/java/androidx/ui/layout/SizeModifiers.kt b/ui/ui-layout/src/main/java/androidx/ui/layout/SizeModifiers.kt
index 870761e..1e5bedf 100644
--- a/ui/ui-layout/src/main/java/androidx/ui/layout/SizeModifiers.kt
+++ b/ui/ui-layout/src/main/java/androidx/ui/layout/SizeModifiers.kt
@@ -20,37 +20,37 @@
import androidx.ui.core.Constraints
import androidx.ui.core.LayoutModifier
import androidx.ui.core.Measurable
+import androidx.ui.core.ModifierScope
import androidx.ui.core.enforce
import androidx.ui.core.hasBoundedHeight
import androidx.ui.core.hasBoundedWidth
-import androidx.ui.unit.Density
import androidx.ui.unit.Dp
import androidx.ui.unit.IntPx
import androidx.ui.unit.isFinite
private data class SizeModifier(private val modifierConstraints: DpConstraints) : LayoutModifier {
- override fun Density.modifyConstraints(constraints: Constraints) =
+ override fun ModifierScope.modifyConstraints(constraints: Constraints) =
Constraints(modifierConstraints).enforce(constraints)
- override fun Density.minIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx =
+ override fun ModifierScope.minIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx =
measurable.minIntrinsicWidth(height).let {
val constraints = Constraints(modifierConstraints)
it.coerceIn(constraints.minWidth, constraints.maxWidth)
}
- override fun Density.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx =
+ override fun ModifierScope.maxIntrinsicWidthOf(measurable: Measurable, height: IntPx): IntPx =
measurable.maxIntrinsicWidth(height).let {
val constraints = Constraints(modifierConstraints)
it.coerceIn(constraints.minWidth, constraints.maxWidth)
}
- override fun Density.minIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx =
+ override fun ModifierScope.minIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx =
measurable.minIntrinsicHeight(width).let {
val constraints = Constraints(modifierConstraints)
it.coerceIn(constraints.minHeight, constraints.maxHeight)
}
- override fun Density.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx =
+ override fun ModifierScope.maxIntrinsicHeightOf(measurable: Measurable, width: IntPx): IntPx =
measurable.maxIntrinsicHeight(width).let {
val constraints = Constraints(modifierConstraints)
it.coerceIn(constraints.minHeight, constraints.maxHeight)
@@ -142,7 +142,7 @@
*/
@Stable
object Fill : LayoutModifier {
- override fun Density.modifyConstraints(constraints: Constraints): Constraints =
+ override fun ModifierScope.modifyConstraints(constraints: Constraints): Constraints =
if (constraints.hasBoundedWidth) {
constraints.copy(minWidth = constraints.maxWidth, maxWidth = constraints.maxWidth)
} else {
@@ -238,7 +238,7 @@
*/
@Stable
object Fill : LayoutModifier {
- override fun Density.modifyConstraints(constraints: Constraints): Constraints =
+ override fun ModifierScope.modifyConstraints(constraints: Constraints): Constraints =
if (constraints.hasBoundedHeight) {
constraints.copy(
minHeight = constraints.maxHeight,
@@ -384,7 +384,7 @@
*/
@Stable
object Fill : LayoutModifier {
- override fun Density.modifyConstraints(constraints: Constraints): Constraints =
+ override fun ModifierScope.modifyConstraints(constraints: Constraints): Constraints =
when {
constraints.hasBoundedWidth && constraints.hasBoundedHeight -> constraints.copy(
minWidth = constraints.maxWidth,
diff --git a/ui/ui-platform/api/0.1.0-dev05.txt b/ui/ui-platform/api/0.1.0-dev05.txt
index db415a1..0e5e7f3 100644
--- a/ui/ui-platform/api/0.1.0-dev05.txt
+++ b/ui/ui-platform/api/0.1.0-dev05.txt
@@ -173,6 +173,7 @@
method public void draw(androidx.ui.graphics.Canvas canvas, androidx.ui.unit.Density density);
method public boolean getAffectsParentSize();
method public androidx.ui.unit.IntPx? getAlignmentLine(androidx.ui.core.AlignmentLine line);
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
method public androidx.ui.core.Constraints getConstraints();
method public androidx.ui.core.LayoutCoordinates getCoordinates();
method public androidx.ui.unit.IntPx getHeight();
@@ -209,6 +210,7 @@
method public void setPositionedDuringMeasurePass(boolean p);
method public void setRef(androidx.ui.core.Ref<androidx.ui.core.LayoutNode>? value);
property public final boolean affectsParentSize;
+ property public final androidx.ui.core.LayoutDirection ambientLayoutDirection;
property public final androidx.ui.core.Constraints constraints;
property protected androidx.ui.core.LayoutNode? containingLayoutNode;
property public final androidx.ui.core.LayoutCoordinates coordinates;
@@ -238,19 +240,19 @@
}
public static interface LayoutNode.MeasureBlocks {
- method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
method public androidx.ui.core.MeasureScope.LayoutResult measure(androidx.ui.core.MeasureScope measureScope, java.util.List<? extends androidx.ui.core.Measurable> measurables, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public abstract static class LayoutNode.NoIntrinsicsMeasureBlocks implements androidx.ui.core.LayoutNode.MeasureBlocks {
ctor public LayoutNode.NoIntrinsicsMeasureBlocks(String error);
- method public Void maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
- method public Void minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public final class LayoutNodeWrapperKt {
diff --git a/ui/ui-platform/api/current.txt b/ui/ui-platform/api/current.txt
index db415a1..0e5e7f3 100644
--- a/ui/ui-platform/api/current.txt
+++ b/ui/ui-platform/api/current.txt
@@ -173,6 +173,7 @@
method public void draw(androidx.ui.graphics.Canvas canvas, androidx.ui.unit.Density density);
method public boolean getAffectsParentSize();
method public androidx.ui.unit.IntPx? getAlignmentLine(androidx.ui.core.AlignmentLine line);
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
method public androidx.ui.core.Constraints getConstraints();
method public androidx.ui.core.LayoutCoordinates getCoordinates();
method public androidx.ui.unit.IntPx getHeight();
@@ -209,6 +210,7 @@
method public void setPositionedDuringMeasurePass(boolean p);
method public void setRef(androidx.ui.core.Ref<androidx.ui.core.LayoutNode>? value);
property public final boolean affectsParentSize;
+ property public final androidx.ui.core.LayoutDirection ambientLayoutDirection;
property public final androidx.ui.core.Constraints constraints;
property protected androidx.ui.core.LayoutNode? containingLayoutNode;
property public final androidx.ui.core.LayoutCoordinates coordinates;
@@ -238,19 +240,19 @@
}
public static interface LayoutNode.MeasureBlocks {
- method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
method public androidx.ui.core.MeasureScope.LayoutResult measure(androidx.ui.core.MeasureScope measureScope, java.util.List<? extends androidx.ui.core.Measurable> measurables, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public abstract static class LayoutNode.NoIntrinsicsMeasureBlocks implements androidx.ui.core.LayoutNode.MeasureBlocks {
ctor public LayoutNode.NoIntrinsicsMeasureBlocks(String error);
- method public Void maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
- method public Void minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public final class LayoutNodeWrapperKt {
diff --git a/ui/ui-platform/api/public_plus_experimental_0.1.0-dev05.txt b/ui/ui-platform/api/public_plus_experimental_0.1.0-dev05.txt
index 83b2aa8..57ce6c1 100644
--- a/ui/ui-platform/api/public_plus_experimental_0.1.0-dev05.txt
+++ b/ui/ui-platform/api/public_plus_experimental_0.1.0-dev05.txt
@@ -175,6 +175,7 @@
method public void draw(androidx.ui.graphics.Canvas canvas, androidx.ui.unit.Density density);
method public boolean getAffectsParentSize();
method public androidx.ui.unit.IntPx? getAlignmentLine(androidx.ui.core.AlignmentLine line);
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
method public androidx.ui.core.Constraints getConstraints();
method public androidx.ui.core.LayoutCoordinates getCoordinates();
method public androidx.ui.unit.IntPx getHeight();
@@ -211,6 +212,7 @@
method public void setPositionedDuringMeasurePass(boolean p);
method public void setRef(androidx.ui.core.Ref<androidx.ui.core.LayoutNode>? value);
property public final boolean affectsParentSize;
+ property public final androidx.ui.core.LayoutDirection ambientLayoutDirection;
property public final androidx.ui.core.Constraints constraints;
property protected androidx.ui.core.LayoutNode? containingLayoutNode;
property public final androidx.ui.core.LayoutCoordinates coordinates;
@@ -240,19 +242,19 @@
}
public static interface LayoutNode.MeasureBlocks {
- method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
method public androidx.ui.core.MeasureScope.LayoutResult measure(androidx.ui.core.MeasureScope measureScope, java.util.List<? extends androidx.ui.core.Measurable> measurables, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public abstract static class LayoutNode.NoIntrinsicsMeasureBlocks implements androidx.ui.core.LayoutNode.MeasureBlocks {
ctor public LayoutNode.NoIntrinsicsMeasureBlocks(String error);
- method public Void maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
- method public Void minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public final class LayoutNodeWrapperKt {
diff --git a/ui/ui-platform/api/public_plus_experimental_current.txt b/ui/ui-platform/api/public_plus_experimental_current.txt
index 83b2aa8..57ce6c1 100644
--- a/ui/ui-platform/api/public_plus_experimental_current.txt
+++ b/ui/ui-platform/api/public_plus_experimental_current.txt
@@ -175,6 +175,7 @@
method public void draw(androidx.ui.graphics.Canvas canvas, androidx.ui.unit.Density density);
method public boolean getAffectsParentSize();
method public androidx.ui.unit.IntPx? getAlignmentLine(androidx.ui.core.AlignmentLine line);
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
method public androidx.ui.core.Constraints getConstraints();
method public androidx.ui.core.LayoutCoordinates getCoordinates();
method public androidx.ui.unit.IntPx getHeight();
@@ -211,6 +212,7 @@
method public void setPositionedDuringMeasurePass(boolean p);
method public void setRef(androidx.ui.core.Ref<androidx.ui.core.LayoutNode>? value);
property public final boolean affectsParentSize;
+ property public final androidx.ui.core.LayoutDirection ambientLayoutDirection;
property public final androidx.ui.core.Constraints constraints;
property protected androidx.ui.core.LayoutNode? containingLayoutNode;
property public final androidx.ui.core.LayoutCoordinates coordinates;
@@ -240,19 +242,19 @@
}
public static interface LayoutNode.MeasureBlocks {
- method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
method public androidx.ui.core.MeasureScope.LayoutResult measure(androidx.ui.core.MeasureScope measureScope, java.util.List<? extends androidx.ui.core.Measurable> measurables, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public abstract static class LayoutNode.NoIntrinsicsMeasureBlocks implements androidx.ui.core.LayoutNode.MeasureBlocks {
ctor public LayoutNode.NoIntrinsicsMeasureBlocks(String error);
- method public Void maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
- method public Void minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public final class LayoutNodeWrapperKt {
diff --git a/ui/ui-platform/api/restricted_0.1.0-dev05.txt b/ui/ui-platform/api/restricted_0.1.0-dev05.txt
index c53356b..48a90b3 100644
--- a/ui/ui-platform/api/restricted_0.1.0-dev05.txt
+++ b/ui/ui-platform/api/restricted_0.1.0-dev05.txt
@@ -175,6 +175,7 @@
method public void draw(androidx.ui.graphics.Canvas canvas, androidx.ui.unit.Density density);
method public boolean getAffectsParentSize();
method public androidx.ui.unit.IntPx? getAlignmentLine(androidx.ui.core.AlignmentLine line);
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
method public androidx.ui.core.Constraints getConstraints();
method public androidx.ui.core.LayoutCoordinates getCoordinates();
method public androidx.ui.unit.IntPx getHeight();
@@ -211,6 +212,7 @@
method public void setPositionedDuringMeasurePass(boolean p);
method public void setRef(androidx.ui.core.Ref<androidx.ui.core.LayoutNode>? value);
property public final boolean affectsParentSize;
+ property public final androidx.ui.core.LayoutDirection ambientLayoutDirection;
property public final androidx.ui.core.Constraints constraints;
property protected androidx.ui.core.LayoutNode? containingLayoutNode;
property public final androidx.ui.core.LayoutCoordinates coordinates;
@@ -240,19 +242,19 @@
}
public static interface LayoutNode.MeasureBlocks {
- method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
method public androidx.ui.core.MeasureScope.LayoutResult measure(androidx.ui.core.MeasureScope measureScope, java.util.List<? extends androidx.ui.core.Measurable> measurables, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public abstract static class LayoutNode.NoIntrinsicsMeasureBlocks implements androidx.ui.core.LayoutNode.MeasureBlocks {
ctor public LayoutNode.NoIntrinsicsMeasureBlocks(String error);
- method public Void maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
- method public Void minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public final class LayoutNodeWrapperKt {
diff --git a/ui/ui-platform/api/restricted_current.txt b/ui/ui-platform/api/restricted_current.txt
index c53356b..48a90b3 100644
--- a/ui/ui-platform/api/restricted_current.txt
+++ b/ui/ui-platform/api/restricted_current.txt
@@ -175,6 +175,7 @@
method public void draw(androidx.ui.graphics.Canvas canvas, androidx.ui.unit.Density density);
method public boolean getAffectsParentSize();
method public androidx.ui.unit.IntPx? getAlignmentLine(androidx.ui.core.AlignmentLine line);
+ method public androidx.ui.core.LayoutDirection getAmbientLayoutDirection();
method public androidx.ui.core.Constraints getConstraints();
method public androidx.ui.core.LayoutCoordinates getCoordinates();
method public androidx.ui.unit.IntPx getHeight();
@@ -211,6 +212,7 @@
method public void setPositionedDuringMeasurePass(boolean p);
method public void setRef(androidx.ui.core.Ref<androidx.ui.core.LayoutNode>? value);
property public final boolean affectsParentSize;
+ property public final androidx.ui.core.LayoutDirection ambientLayoutDirection;
property public final androidx.ui.core.Constraints constraints;
property protected androidx.ui.core.LayoutNode? containingLayoutNode;
property public final androidx.ui.core.LayoutCoordinates coordinates;
@@ -240,19 +242,19 @@
}
public static interface LayoutNode.MeasureBlocks {
- method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
method public androidx.ui.core.MeasureScope.LayoutResult measure(androidx.ui.core.MeasureScope measureScope, java.util.List<? extends androidx.ui.core.Measurable> measurables, androidx.ui.core.Constraints constraints);
- method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public androidx.ui.unit.IntPx minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public androidx.ui.unit.IntPx minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public abstract static class LayoutNode.NoIntrinsicsMeasureBlocks implements androidx.ui.core.LayoutNode.MeasureBlocks {
ctor public LayoutNode.NoIntrinsicsMeasureBlocks(String error);
- method public Void maxIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void maxIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
- method public Void minIntrinsicHeight(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
- method public Void minIntrinsicWidth(androidx.ui.unit.Density density, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void maxIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void maxIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
+ method public Void minIntrinsicHeight(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx w);
+ method public Void minIntrinsicWidth(androidx.ui.core.ModifierScope modifierScope, java.util.List<? extends androidx.ui.core.IntrinsicMeasurable> measurables, androidx.ui.unit.IntPx h);
}
public final class LayoutNodeWrapperKt {
diff --git a/ui/ui-platform/src/main/java/androidx/ui/core/AndroidOwner.kt b/ui/ui-platform/src/main/java/androidx/ui/core/AndroidOwner.kt
index c58e457..cd534ff 100644
--- a/ui/ui-platform/src/main/java/androidx/ui/core/AndroidOwner.kt
+++ b/ui/ui-platform/src/main/java/androidx/ui/core/AndroidOwner.kt
@@ -803,25 +803,25 @@
}
override fun minIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
) = error("Undefined intrinsics block and it is required")
override fun minIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
) = error("Undefined intrinsics block and it is required")
override fun maxIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
) = error("Undefined intrinsics block and it is required")
override fun maxIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
) = error("Undefined intrinsics block and it is required")
diff --git a/ui/ui-platform/src/main/java/androidx/ui/core/ComponentNodes.kt b/ui/ui-platform/src/main/java/androidx/ui/core/ComponentNodes.kt
index c784e9b..d893bf2 100644
--- a/ui/ui-platform/src/main/java/androidx/ui/core/ComponentNodes.kt
+++ b/ui/ui-platform/src/main/java/androidx/ui/core/ComponentNodes.kt
@@ -849,7 +849,7 @@
* The function used to calculate [IntrinsicMeasurable.minIntrinsicWidth].
*/
fun minIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
): IntPx
@@ -858,7 +858,7 @@
* The lambda used to calculate [IntrinsicMeasurable.minIntrinsicHeight].
*/
fun minIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
): IntPx
@@ -867,7 +867,7 @@
* The function used to calculate [IntrinsicMeasurable.maxIntrinsicWidth].
*/
fun maxIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
): IntPx
@@ -876,7 +876,7 @@
* The lambda used to calculate [IntrinsicMeasurable.maxIntrinsicHeight].
*/
fun maxIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
): IntPx
@@ -884,25 +884,25 @@
abstract class NoIntrinsicsMeasureBlocks(private val error: String) : MeasureBlocks {
override fun minIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
) = error(error)
override fun minIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
) = error(error)
override fun maxIntrinsicWidth(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
h: IntPx
) = error(error)
override fun maxIntrinsicHeight(
- density: Density,
+ modifierScope: ModifierScope,
measurables: List<IntrinsicMeasurable>,
w: IntPx
) = error(error)
@@ -924,6 +924,15 @@
}
}
+ var ambientLayoutDirection = LayoutDirection.Ltr
+ internal set(value) {
+ if (value != field) {
+ field = value
+ measureScope.layoutDirection = value
+ measureScope.ambientLayoutDirection = value
+ }
+ }
+
/**
* The scope used to run the [MeasureBlocks.measure] [MeasureBlock].
*/
diff --git a/ui/ui-platform/src/main/java/androidx/ui/core/LayoutNodeWrapper.kt b/ui/ui-platform/src/main/java/androidx/ui/core/LayoutNodeWrapper.kt
index 075dae6..94de704 100644
--- a/ui/ui-platform/src/main/java/androidx/ui/core/LayoutNodeWrapper.kt
+++ b/ui/ui-platform/src/main/java/androidx/ui/core/LayoutNodeWrapper.kt
@@ -358,6 +358,7 @@
}
override fun measure(constraints: Constraints): Placeable = with(layoutModifier) {
+ updateLayoutDirection()
val measureResult = withMeasuredConstraints(constraints) {
wrapped.measure(layoutNode.measureScope.modifyConstraints(constraints))
}
@@ -366,18 +367,22 @@
}
override fun minIntrinsicWidth(height: IntPx): IntPx = with(layoutModifier) {
+ updateLayoutDirection()
layoutNode.measureScope.minIntrinsicWidthOf(wrapped, height)
}
override fun maxIntrinsicWidth(height: IntPx): IntPx = with(layoutModifier) {
+ updateLayoutDirection()
layoutNode.measureScope.maxIntrinsicWidthOf(wrapped, height)
}
override fun minIntrinsicHeight(width: IntPx): IntPx = with(layoutModifier) {
+ updateLayoutDirection()
layoutNode.measureScope.minIntrinsicHeightOf(wrapped, width)
}
override fun maxIntrinsicHeight(width: IntPx): IntPx = with(layoutModifier) {
+ updateLayoutDirection()
layoutNode.measureScope.maxIntrinsicHeightOf(wrapped, width)
}
@@ -417,6 +422,10 @@
paint.style = PaintingStyle.stroke
}
}
+
+ private fun updateLayoutDirection() = with(layoutModifier) {
+ layoutNode.measureScope.layoutDirection = layoutNode.measureScope.modifyLayoutDirection()
+ }
}
internal class ModifiedDrawNode(