Flashbar icon indicating copy to clipboard operation
Flashbar copied to clipboard

The action button gets hidden under navigation bar on Tablet Devices using `Flashbar.Gravity.BOTTOM`

Open hossain-khan opened this issue 6 years ago • 4 comments

Summary

The action button gets hidden under the navigation bar when used in tablets, making them untapable.

  • Library Version Tested: 1.0.1 and 1.0.2
  • OS Version: 6.0.1, 7.1.1 (Used emulator)

Screencast

screencapture-1526087965459

Code Used

flashbar = Flashbar.Builder(this)
        .gravity(Flashbar.Gravity.BOTTOM)
        .title("Title")
        .message("Message")
        .backgroundColorRes(R.color.colorPrimaryDark)
        .positiveActionText(R.string.btn_cta_preceed)
        .negativeActionText(R.string.btn_cta_okay)
        .positiveActionTextColorRes(R.color.colorAccent)
        .negativeActionTextColorRes(R.color.colorAccent)
        .positiveActionTapListener(object : Flashbar.OnActionTapListener {
            override fun onActionTapped(bar: Flashbar) {
                bar.dismiss()
            }
        })
        .negativeActionTapListener(object : Flashbar.OnActionTapListener {
            override fun onActionTapped(bar: Flashbar) {
                bar.dismiss()
            }
        })
        .build()

hossain-khan avatar May 12 '18 01:05 hossain-khan

Might be related to https://github.com/aritraroy/Flashbar/issues/3

hossain-khan avatar May 12 '18 01:05 hossain-khan

This happened with me too, but I'm trying to implement the flashbar on an activity with the transparent navigation bar, but the snackbar starts to appear exactly above the navigation bar when it should start to move from the bottom of the screen.

danilodequeiroz avatar May 24 '18 16:05 danilodequeiroz

Also, there's a difference in behavior from lollipop to newer versions (Oreo), the nexus5x avd on the right is the lollipop one, on the left we have an oreo avd.

screen shot 2018-05-24 at 13 57 11

danilodequeiroz avatar May 24 '18 16:05 danilodequeiroz

Got the same problem on my tablet. Anyone have a solution to fix this ?

tristan-lg avatar Jul 16 '19 18:07 tristan-lg