material-components / material-components/material-components-android

[Motion] Support gravity for MaterialContainerTransform

Open
#1,120 1 comment 1 reaction 2 assignees View on GitHub

@andrelabonte is already working on this.

Since Mar 30, 2020.

feature request Feature: Transition
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
`MaterialContainerTransform` scales the target view to the size of the source view. If the aspect ratio doesn't match the target view is clipped and the two views are aligned by their top. This is unfortunate as it will look bad when the main element is an image that uses the `CENTER_CROP` scale type for example as it will be quite obvious that the positioning is off.

**Describe the solution you'd like**
Ideally you should be able to specify the "gravity" of the target view's initial position. The default could be the current behavior (`Gravity.TOP | Gravity.LEFT`).

**Describe alternatives you've considered**
N/A

**Additional context**
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.