aurelhubert / aurelhubert/ahbottomnavigation
FAB not showing intially, but is visible when SnackBar is shown
- Dominant language
- Java
- Stars
- 3.8k
- Forks
- 672
- PR merge metrics
- No merged PRs in 30d
Description
My layout looks like this
```
```
I have nested FAB and BottomNavigation becasue I have a Recycler in my Framelayout and I don't want the BottomNavigation to be hidden when the user scrolls, but also do all the usual animation.
I am calling `manageFloatingActionButtonBehavior(fab);` when setting up the BottomNavigation.
Now when I run the app I am not able to view the FAB when I switch to that particular fragment. But when I create a snack bar with the below code
`Snackbar.make(activity.getNavigation(), "Message", Snackbar.LENGTH_LONG).show();`
When the snackbar appears the Fab is shown (during the animation) and works there after as intended. But when I remove this code `manageFloatingActionButtonBehavior(fab);` the fab shows up. However, the animation is not proper.
I am not able to understand why the fab is not shown initially, but only after animation.
Tested on Marshmallow
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue mentions a nested CoordinatorLayout containing a FloatingActionButton and AHBottomNavigation, and the manageFloatingActionButtonBehavior(fab) entry point. Start by reproducing the layout on Marshmallow with and without that call, then trace the behavior during initial display and Snackbar animation. Done means the FAB is visible when switching to the fragment while retaining the intended animation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100