nandorojo / burnt

Crunchy toasts for React Native. 🍞
MIT License
1.16k stars 36 forks source link

In android we can implement with reanimated? #2

Closed eduardoborges closed 1 year ago

eduardoborges commented 1 year ago

Bring more performance to the library, buuut... reanimated must be a lib dep. It's a problem?

nandorojo commented 1 year ago

I think a better solution would be to use a native Android toast. https://developer.android.com/guide/topics/ui/notifiers/toasts

fobos531 commented 1 year ago

I think a better solution would be to use a native Android toast. developer.android.com/guide/topics/ui/notifiers/toasts

@nandorojo Hey, I agree that the native toast is better in this case. However, the "vanilla" Android toast has an extremely simple/primitive API. Since we're using a 3rd party library for iOS already, maybe we could do the same for Android to achieve higher feature parity between the platforms. Have you come across an Android toast library that you like?

nandorojo commented 1 year ago

I haven't, but I'm open to suggestions! There's also the Android Snackbar

alantoa commented 1 year ago

@nandorojo @fobos531 hey, if use native on Android, I'm recommended this https://github.com/getActivity/ToastUtils, it's very small and supports a wide variety of functions, can install and try it.

also have this, but I haven't try.

nandorojo commented 1 year ago

is there an english version of the docs?

fobos531 commented 1 year ago

@nandorojo I can't believe I didn't think of it before, but React Native core actually has a ToastAndroid API built in - maybe that could be used until a more feature-fledged alternative is found & implemented?

nandorojo commented 1 year ago

Oh, cool yeah that works.

nandorojo commented 1 year ago

Burnt 0.8 now uses ToastAndroid to add Android support.

yarn add burnt

Burnt.alert() falls back to Burnt.toast() on Android since there is no equivalent.