Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

[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
Contributor

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
Contributor

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
Loading

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

Successfully merging this pull request may close these issues.

2 participants