Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Row & Column feature parity] LastBaseline alignment experiment #805

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jswong65
Copy link
Collaborator

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

image

Bottom to LastBaseline

image

Baseline to LastBaseline

image

@jafu888
Copy link
Collaborator

jafu888 commented Apr 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants