Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snack-bar Impl #42

Merged
merged 3 commits into from
Mar 5, 2024
Merged

Conversation

Ammar-Ishfaq
Copy link
Contributor

@Ammar-Ishfaq Ammar-Ishfaq commented Mar 5, 2024

Hello @vishal2376 I've added the code for the snack bar and removed the toast overall the app could you please look into it and let it merge

PR for the issue #40
Here's what it'll look like:
image

@vishal2376
Copy link
Owner

@Ammar-Ishfaq The main reason for implementing it is to add the swipe-to-dismiss feature and optional action text.

The function should look like this:

fun showCustomSnackbar(
msg:String,
delay:Int = 1000,
actionText: String? = null,
onClickAction: ()->Unit = {}
){
// rest of the code
}

Tell me if you can implement above function with swipe-to-dismiss feature ???

@Ammar-Ishfaq
Copy link
Contributor Author

Sure let me add those changings

@Ammar-Ishfaq
Copy link
Contributor Author

Hello @vishal2376 please find the updated code and here's the video of that impl

Screen_recording_20240305_164525.mp4

@vishal2376
Copy link
Owner

Reference Image:

image

This is how snackbar look like with actionText (i.e. "Retry")

Great Work. Thanks @Ammar-Ishfaq for your contribution

I will do the remaining UI work

@vishal2376 vishal2376 merged commit 99c3372 into vishal2376:master Mar 5, 2024
@Ammar-Ishfaq
Copy link
Contributor Author

Thank you for the reference. I designed the custom snack bar based on our specific needs, considering the absence of a predefined design reference. If there are future opportunities or other projects where my contributions can be valuable, I'm more than willing to participate. Thanks again for integrating my contribution.
Have a good day ahead. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants