vishal2376 / snaptick

Snaptick is an MVVM Jetpack Compose app, offering ad-free task management with a built-in pomodoro timer to help you organize your daily plans
GNU General Public License v3.0
301 stars 23 forks source link

Snack-bar Impl #42

Closed Ammar-Ishfaq closed 4 months ago

Ammar-Ishfaq commented 4 months ago

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 commented 4 months ago

@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 commented 4 months ago

Sure let me add those changings

Ammar-Ishfaq commented 4 months ago

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

https://github.com/vishal2376/snaptick/assets/54596139/a66c347b-7cf3-4684-ac0c-d9ab690e0d4b

vishal2376 commented 4 months ago

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

Ammar-Ishfaq commented 4 months ago

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. 😊