Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
52 views

Remove the background of the bottom navigation

I am testing my React Native app on two devices. And for the past two days I've been trying to find a way to remove the background of the bottom navigation. I've tried transparent mode, but it's not ...
Nikk's user avatar
  • 7,871
1 vote
0 answers
439 views

Undo Snackbar with a SwipeToDismissBox

I'm starting to get into Jetpack Compose and am trying to implement a list where you can swipe to delete an item but you can also restore it via a Snackbar action. In the old XML-Layout-based world I ...
Sunner's user avatar
  • 23
0 votes
0 answers
453 views

How can I ensure that the snackbar remains visible and not hidden behind the modal bottom sheet on Compose?

TL-DR -> How can I ensure that the snackbar remains visible and not hidden behind the modal bottom sheet? What is the reason of it? I'm creating a Snackbar using snackbarHost and snackBarHostState ...
alpertign's user avatar
  • 316
2 votes
1 answer
164 views

Android Snackbar.SnackbarLayout obsolete; replacement?

I'm maintaining an "enterprise" Android app that runs on wrist-mounted computers in an industrial environment. When we need to let the user know something of middling importance, we have the ...
Douglas Henke's user avatar
0 votes
3 answers
2k views

Don't use 'BuildContext's across async gaps in Flutter warning doesn't go away

Flutter gives me the warning "Don't use 'BuildContext's across async gaps. Try rewriting the code to not use the 'BuildContext', or guard the use with a 'mounted' check". The warning is in ...
AvestaChang's user avatar
5 votes
0 answers
257 views

Should I use a banner in Android with Material 3?

We use the Google Maps SDK. We want to use an icon inside of a Snackbar to make it easier for a user to grasp that internet connection is missing, or that he needs to zoom in, for using a feature. ...
LukeTheNuke's user avatar
1 vote
1 answer
54 views

Prevent Snackbar Overlap with FloatingActionButton in ConstraintLayout of Activity's Child Fragment

This is my current Setup: I have a BaseActivity that registers the snackbar on the root layout (CoordinatorLayout): <?xml version="1.0" encoding="utf-8"?> <androidx....
Chris's user avatar
  • 13
1 vote
0 answers
83 views

Snackbar disappear with recomposition

I have implemented method to manage single-time events in android compose, like displaying snackbar, according to this article by Marco Cattaneo on medium.com. It uses channel of messages in viewmodel....
OndraVojta's user avatar
0 votes
1 answer
56 views

How to put snackbar button response in one suspend function in Kotlin jetpack

How to put snackbar button response in one suspend function in Kotlin jetpack. I have one SnackbarResult.ActionPerformed for all my snackbars. And I have suspend fun for my snackbar: suspend fun ...
Slava's user avatar
  • 717
4 votes
2 answers
2k views

Jetpack compose snackbar hidden behind bottomsheet

I show a SnackBar inside Scaffold like this: val scaffoldState = rememberScaffoldState() LaunchedEffect(offerViewModel.onAddToCartError) { offerViewModel.onAddToCartError = { ...
Alexander Tumanin's user avatar
1 vote
1 answer
358 views

Handling Snackbar display in Compose Globally

Hi I am using the below code to handle the snackbar display globally. I am new to compose and I went through various videos and blogs, and finally came up with below. Is this the right way of doing ...
Vicky's user avatar
  • 1,947
1 vote
1 answer
90 views

how to set snackbar message in the center of Screen in Angular

I have a snackbar i am calling this snackbar on the button click. Below is the button .html <button mat-icon-button (click)="UpdateCandidateData(row)" matTooltip="Save Changes" ...
Bellam Bharath's user avatar
0 votes
1 answer
177 views

How to design an icon in Snack bar?

Is there any way to put a button on Snack bar to do some actions like canceling , undo or closing the snack bar with clicking on a designed icon? i'm usin Kotlin and Xml in android studio tried using ...
Diako 's user avatar
0 votes
0 answers
57 views

Should a custom SnackbarHost use the Scaffold's default SnackbarHostState or a custom one?

There are apparently two ways to initialize a custom Snackbar. You can do this by using a custom SnackbarHostState and ignoree the default one passed to the lambda. (I found it in this question while ...
t3chb0t's user avatar
  • 18.5k
4 votes
2 answers
2k views

Android Jetpack Compose Snackbar: How to immediately close the previous Snackbar when a new one is triggered?

I'm facing an issue with Android Jetpack Compose Snackbar in my application. I have a LazyColumn where each row is a SwipeToDismiss composable. On each swipe, I remove the row and show a Snackbar. ...
Ashish Dwivedi's user avatar
0 votes
1 answer
359 views

Get user location in Compose with M3

I am trying to get the User Location in Compose. I found this link and tried the Mitch solution. But it has an infinite loop and the snackbar is not shown. From other links I read that it needs to be ...
jetberrocal's user avatar
2 votes
0 answers
56 views

How to add modifier in rememberScaffoldState of snackbarHostState?

So, I've been following this article. The code below shows the snackbar state, how do I add modifier in the below code so that I can have the snackbar show in top or bottom area. My goal is to somehow ...
Ashutosh Soni's user avatar
0 votes
1 answer
99 views

How to add snackbar when user already exists in jetpack compose android

I want to show the user snackbar when user already exists in firebase. How can I add a snackbar notification when .addOnFailureListener or user already exists? I have conceptual knowledge gap so ...
Kaleab Woldemariam's user avatar
0 votes
1 answer
186 views

How to make SnackBar NOT match_parent - android kotlin

Initially, I wanted to make Toast with a custom layout, but then I saw that starting from Android 11, it was not desirable to do this, and the setView() method for Toast became deprecated. I decided ...
onesector's user avatar
  • 444
-1 votes
1 answer
137 views

How to have an alert similar to Twitter Toast/Snackbar alert in Android Studio?

How one can have Toast/Snackbar notification UI like Twitter Toast/Snackbar notification in android studio (java or kotlin)?
user21193451's user avatar
2 votes
1 answer
1k views

Android display Snackbar on returning from another screen

In all android compose examples I seen they show a snackbar message with undo when u delete from a list... and stay in same screen. Can someone link me to an example where they select a record and GO ...
Lixo's user avatar
  • 91
0 votes
0 answers
425 views

How to do custom message box in android jetpack compose?

I want to show a message box at the bottom of the screen there will be an image on the left of the message box and a message on the right as fillmaxwidth size if a success response is returned from ...
NewPartizal's user avatar
  • 1,094
2 votes
1 answer
3k views

Jetpack Compose Snackbar above Dialog

How can a Snackbar be shown above a Dialog or AlertDialog in Jetpack Compose? Everything I have tried has resulted in the snack bar being below the scrim of the dialog not to mention the dialog itself....
coderforlife's user avatar
  • 1,527
3 votes
3 answers
6k views

How can I fix exception "Floating SnackBar presented off screen" in flutter

I have an app that displays a snackbar when some action is done. I had tested this with my phone and some emulator and it works. Recently I installed an emulator with android 13 and maybe a bigger ...
nck's user avatar
  • 2,161
1 vote
0 answers
61 views

Is it possible to hide android screenshot toolbar but detect the screenshot to show my custom screenshot toolbar from app?

Is it possible to hide android screenshot toolbar but detect the screenshot to show my custom screenshot toolbar from app? I tried: getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, ...
Prerna's user avatar
  • 11
0 votes
1 answer
171 views

I'm trying to implement a snackbar in android studio but the app keeps crashing when i use it

I'm trying to implement a snackbar in android studio where when i click the button in the center of the screen, it will display the snackbar and say "moving to second screen". if the user ...
TheGoldenGear_RR5's user avatar
0 votes
2 answers
871 views

How to change TextStyle in Snackbar with Scaffold?

Don't understand how to assign text style to Snackbar Scaffold( scaffoldState = scaffoldState, snackbarHost = { hostState -> SnackbarHost(hostState = hostState) { data -...
VangelNum's user avatar
0 votes
1 answer
396 views

Chain Snackbar calls

I'm trying to use the snackbar on Android Compose. However, as I'm trying to display 2 messages in a row on the snackbar, I can only see the first message, does anybody know what can cause this? I'm ...
A.Danibo's user avatar
  • 614
0 votes
2 answers
134 views

How to alight drawable left near to TextView Android (Or custom snackbar android)

I'm using a custom SnackBar for android, I have created SnackBar with an icon and a message. Icon drawable isn't working as expected. The margin text is further than expected. So, this is what I did: ...
Nguyễn Kim Khánh's user avatar
0 votes
1 answer
179 views

The argument type 'BuildContext' can't be assigned to the parameter type 'OverlayState'. top_snackbar_flutter: ^3.0.0

showTopSnackBar( context, CustomSnackBar.success( message: "Good job, your release is successful. Have a nice day", ), ); top_snackbar_flutter: ^3.0.0
Kiran Jadhav's user avatar
  • 3,307
4 votes
1 answer
2k views

Queue of snackbars jetpack Compose

When i call Snackbar multiple times, they create a queue and occure one by one. I want a new Snachbar to immediately close previous one. Here is my code: Scaffold( snackbarHost = { ...
Максим Зозуляк's user avatar
0 votes
1 answer
941 views

How to resolve the Show Snack Bar Error in Line Context

Recently i am trying to run the project but seem the snackbar is have some kind of error like this the compiler show the error below the "context" message how to solve it? void ...
Blaismer's user avatar
1 vote
2 answers
248 views

Is there way to bring snackbar to the front, like Toast?

I try bring the snackbar to the foremost ui. My case is Open internet_connectiviity popup(modal) with Settings.panel.ACTION_INTERNET_CONNECTIVITY When user enable wifi, my app shows an alert to close ...
KingJinho's user avatar
  • 763
0 votes
1 answer
68 views

Snackbar message being replicated

I have created a bottom navigation bar in which i have three fragments, for now,let's say fragment 1, 2 and 3. I have enabled a live data observer and it shows a message whenever an api returns the ...
Abhijith Warrier's user avatar
2 votes
2 answers
1k views

How to override SnackbarData in Jetpack Compose?

I need a custom parameter in the snackbar, but showSnackbar only allows passing three parameters (message, actionLabel and duration). I need to pass an Enum to decide which status to show. @Composable ...
Gustavo Faria's user avatar
0 votes
1 answer
488 views

How to format the text of a Snackbar in Android

I have a method that displays snackbars which is called from many different fragments. Here is the code of this method: public static void showSnackBar(Activity activity, String message, View root) { ...
VanessaF's user avatar
  • 793
2 votes
2 answers
181 views

Snackbar replaces toast and unit tests crash when snackbar comes to foreground

I have replaced Toast with Snackbar in my code. I have added the following dependency in the corresponding build: implementation('com.google.android.material:material:1.8.0-alpha01') private fun ...
liliangeorg's user avatar
2 votes
1 answer
304 views

Android java - Trying to show snackbar in new thread

Ive been trying to make my bluetooth connection thread be able to send messages to the user through snackbars, but they never appear on the screen. In main method: //listener for connect button ...
MegaBread's user avatar
1 vote
2 answers
892 views

Jetpack compose snackbar action click is not working

I have displayed a snackbar with specific action in Jetpack compose but click listener on that action is not working. Here is my code: @Composable fun MySnackBar() { Snackbar( ...
Sumit Shukla's user avatar
  • 4,484
8 votes
2 answers
2k views

Scalable way to use the Snackbar in Android Compose

This is not a post to have a solution but to discuss the project structure on Compose. I'm currently learning Compose and I have difficulties to understand how to use the Snackbar in a project. Most ...
A.Danibo's user avatar
  • 614
3 votes
1 answer
3k views

How to change background color of the jetpack compose snackbar?

I want to change solid or gradient color to jetpack compose snack bar. Please guide me how to change color Here is my snack bar using material3 compose, I am looking solution to change the background ...
Bolt UIX's user avatar
  • 6,482
2 votes
1 answer
2k views

How to show a Snackbar in Android on the top when using ConstraintLayout in a nice way

I am using ConstraintLayout in Android and I would like to display a Snackbar message at the top of the screen. I found this question on Stackoverflow: How to show Snackbar at top of the screen The ...
VanessaF's user avatar
  • 793
0 votes
1 answer
857 views

Android Snackbar: No suitable parent found from the given view. Please provide a valid view

I have a Fragment class and a normal HelpFunctionsclass. I want the Fragment class to show a Snackbar by calling a method in the HelpFunctionsclass. In the Fragment class I call the following code ...
VanessaF's user avatar
  • 793
-2 votes
2 answers
1k views

How to set margin in SnackBar

I'm trying to add margins at bottom, left and right to my SnackBar but I'm not able to get it. That's what I tried: var snackBar = Snackbar.make(binding.root,msg,Snackbar.LENGHT_LONG) var ...
HeraGonz's user avatar
  • 355
0 votes
1 answer
100 views

Action in SnackBar called instantly when show

I'm trying to show my SnackBar but my action is being called instantly when shown and not when the button is clicked. Why is this happening? fun showSnackBar(msg:String,btnMsg:String,action:Unit){ ...
dimioLt's user avatar
  • 59
1 vote
1 answer
301 views

Snackbar overlays Admob banner ad

I have a snackbar which overlays the banner ad. It has a LENGTH_INDEFINITE because I have some functionality I need to complete after the snackbar is displayed. Would this be considered a violation of ...
Nilesh's user avatar
  • 57
1 vote
0 answers
462 views

Snackbar over multiple activity's

I have a snackbar but when switching activity's it stays on the original activity it had been activated. Is there a way to make it stay on screen when switching activity's? val mainSnackBar = ...
mohammed_sajid's user avatar
0 votes
1 answer
278 views

SnackBar Direction in Compose

I implement user interface in Jetpack Compose, and want to show SnackBar inside Compose functions. the issue is that i can't change SnackBar's Layout Direction to Rtl. What I've implemented to change ...
Mohammad cs's user avatar
0 votes
0 answers
111 views

Could not able to change the width of snackbar using material 1.5.0

Could not able to change the width of the snackbar when migrated material design from 1.3.0 to 1.5.0. Using below code : val contentLayoutParams = snackBar.view.layoutParams as FrameLayout....
Rathan Kumar's user avatar
  • 2,577
4 votes
4 answers
2k views

Compose Snackbar not appearing on repeated error

I am new to jetpack compose and is trying to show an error snackbar whenever the error message I am observing is not null. Scaffold(scaffoldState = scaffoldState) { LaunchedEffect(errorMessage)...
Hyzam's user avatar
  • 173

1
2 3 4 5
10