Open jswong65 opened 1 year ago
This implies we need to expand the scope of the interface to "measure" lastBaselin alignment is not supported in the core of ConstraintLayout but it may not need to be. It has support for baseline we can add some side information as to the type of baseline So that when measure ask for the position of the baseline it returns the correct one.
Work with Oscar to define a correct sequence diagram (sort of like the one below) in your design document. Lets get to a clear understanding of the current approach and how it might be extended.
sequenceDiagram
participant CL Compose
participant Core
CL Compose->>Core: Config ConstraintSet
CL Compose->>Core: request layout
loop till solver done
Core->>CL Compose: Measure widget1
Core->>CL Compose: Measure widget2
end
Core->>CL Compose: layout info widget1
Core->>CL Compose: layout info widget2
This PR is created to experiment how to enable LastBaseline alignment. Currently, we only support FirstBaseline alignment in ConstraintLayout Compose.
Some examples can be seen below (based on LastBaselineDemo.kt).
Top to LastBaseline
Bottom to LastBaseline
Baseline to LastBaseline