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

[ShapeAppearanceModel] Automatically handle RTL layout

Open
#2,723 2 comments 1 reaction 1 assignee View on GitHub

@imhappi is already working on this.

Since Jun 6, 2022.

feature request Feature: Shape Good First Issue
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.**
Consider the following style using `MaterialCardView`:

```xml

<item name="shapeAppearance">@style/ShapeAppearance.AppTheme.DiagonallyRounded</item>


<item name="cornerSize">24dp</item>
<item name="cornerFamily">rounded</item>
<item name="cornerSizeBottomRight">0dp</item>
<item name="cornerSizeTopLeft">0dp</item>

```

Clearly, this will display a card rounded in the top-right and bottom-left corners (since others are set to `0`). When the layout is set to RTL, it should swap the positions (it does not here since it correctly handles `left` or `right` instead of `start` or `end`).

**Describe the solution you'd like**
It should be logical to rename the existing options or provide new options such as `cornerSizeBottomEnd`, `cornerSizeTopStart` which would handle RTL layouts.

**Describe alternatives you've considered**
Handle it myself programmatically.

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.