material-components / material-components/material-components-android
Add Views to Toolbar added to CollapsingToolbarLayout
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** The problem is when I add a view for Exmaple an ImageButton to toolbar that is direct child of CollapsingToolbarLayout that ImageButton's `layout_gravity` is not true in Rtl languages. When I set `layout_gravity` to `start` for exmaple, this ImageButton's is sticked to left of toolbar in English language(as a Ltr language) but in persian language(as a Rtl language) it is sticked to left of toolbar again(as this means `end` not `start`).
**Expected behavior:** `layout_gravity="start"` of direct child of toolbar in CollapsingToolbarLayout should stick to right of toolbar and vice versa.
**Source code:**
```
```
**Android API version:** Any but tested in 29
**Material Library version:** 1.2.1 latest stable right now
**Device:** Nexus 4 emulator
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the supplied XML as the reproduction case and start at CollapsingToolbarLayout's handling of direct toolbar children and layout_gravity. Compare English and Persian/RTL behavior for start and end. Done when start and end place the ImageView on the corresponding relative edge in both layout directions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100