Tapadoo / Alerter

An Android Alerting Library
MIT License
5.52k stars 632 forks source link

It's showing behind the BottomSheetDialogFragment. How I can solve this problem? Please help.. #250

Open soantrinh-diag opened 3 years ago

parmarravi commented 3 years ago

Is there a solution to show on top of bottom sheet dialog fragment

kpmmmurphy commented 3 years ago

Hey @parmarravi @soantrinh-diag, could you please confirm the version of Alerter you are using, and provide a code snippet of how you are calling the Alerter please.

parmarravi commented 3 years ago

Its 7.0.0

implementation 'com.tapadoo.android:alerter:7.0.0'
kpmmmurphy commented 3 years ago

Hey @parmarravi, could you provide a code snippet also please? I recommend you read our contributing document where we outline how to log issues - https://github.com/Tapadoo/Alerter/blob/master/CONTRIBUTING.md.

mohammadrezaberenji commented 3 years ago

@kpmmmurphy @parmarravi I also have this problem with showing alerter inside a botthomSheetDialogFragment. it's not in focus and it seems that it shows the top of behind activity/fragment. on lates version 7.2.4

mohammadrezaberenji commented 3 years ago

@kpmmmurphy @parmarravi I found how it was wrong. I was using Alerter.create(activity ) instead of Alerter.creat(dialog). now the problem is solved. Thanks! @soantrinh-diag

sudarshaana commented 2 years ago

@mohammadrezaberenji, I am facing the same issue. Can you share your implementation?

mohammadrezaberenji commented 2 years ago

@sudarshaana you must use the 7.2.4 version of Alerter. and if you want to use it in dialog pass the dialog reference into constructor. see this :

Gradle : implementation 'com.github.tapadoo:alerter:7.2.4'

val snackBar: Alerter = Alerter.create(dialog) .setText(message) .setRightIcon(R.drawable.circle_grey) .setContentGravity(Gravity.END) .setTextAppearance(R.style.textSnackBarMessage) .setBackgroundColorRes(color) .enableSwipeToDismiss() .setDuration(if (hideAutomatically) durationTime else durationTimeLong)