aurelhubert / aurelhubert/ahbottomnavigation

Snackbar coordinator behavior not works if minSdkVersion > KITKAT.

Open
#331 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.8k
Forks
672
PR merge metrics
No merged PRs in 30d

Description

Snackbar doesn't change it position with bottom bar on scrolling

This code is fired only for minSdkVersion <= KITKAT, but, probably, should also be fired for > KITKAT.
```
if (snackbarLayout != null && snackbarLayout.getLayoutParams() instanceof ViewGroup.MarginLayoutParams) {
targetOffset = child.getMeasuredHeight() - child.getTranslationY();
ViewGroup.MarginLayoutParams p = (ViewGroup.MarginLayoutParams) snackbarLayout.getLayoutParams();
p.setMargins(p.leftMargin, p.topMargin, p.rightMargin, (int) targetOffset);
snackbarLayout.requestLayout();
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.