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

[BottomAppBar] fabCradleVerticalOffset only affects the position of the FAB, ignores the actual cradle

Open
#3,649 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**Description:**
As the title says, the `fabCradleVerticalOffset` attribute on BottomAppBar, which I want to be 0dp, only affects the offset of the FAB, while the cradle stays the same as if the offset is set to 12dp (the default value)
This is what it looks like:
![image](https://github.com/material-components/material-components-android/assets/64900852/cb4f7c53-5eed-4803-ad22-f96a5a0c3c08)
Edit: I noticed this only happens when the FAB is square, settings FAB's `shapeAppearance` to a style that would make it fully circular makes the cradle display as expected

**Expected behavior:**
Mockup of the expected behaviour:
![image](https://github.com/material-components/material-components-android/assets/64900852/bc863ed6-65c4-489e-9526-4e0d52bb32ad)

**Source code:**
```

```

**Android API version:** My device is running Andriod 12 (SDK 32)

**Material Library version:** Tested on 1.10.0 and 1.9.0, occurs on both

**Device:** Google Pixel 3

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.

Research direction

Start by reproducing the supplied CoordinatorLayout, BottomAppBar, and FloatingActionButton setup on Android 12 with Material Library 1.10.0 or 1.9.0, comparing square and fully circular FAB shapes. Trace the BottomAppBar cradle and FAB positioning behavior; done means fabCradleVerticalOffset="0dp" moves both the FAB and the cradle as shown in the expected mockup.

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
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.