Is there any way to make 'Snackbar' like 'Toast Message'? The look can be customized but, when a button is behind of the snackbar, it's not clickable until the snackbar disapear. I'd like to make it clickable when snackbar covers the buttons. How can I solve this issue?
j
Joel Denke
05/22/2023, 6:26 AM
You want the button behind snackbar clickable? I would focus on make sure snackbar not covering content. If really need propagate click event would need custom snackbar and make sure delegating "nested" click event by not consume touch event.
If snackbar using interaction source, can try share it with your button for clickable modifier.
https://developer.android.com/jetpack/compose/touch-input/handling-interactions
z
Zach Klippenstein (he/him) [MOD]
05/24/2023, 4:20 PM
Based on the M2 implementation docs, it looks like snackbars are supposed to be swipeable, so making them pass through touch events would be against spec, probably
c
chanjungskim
05/25/2023, 11:24 AM
@Joel Denke Well, I am using Snackbar like Toast Message(The customed UI). So, it covers contents and the client still should be able to touch the button behind the Snackbar.