triniwiz / nativescript-toasty

:bread: NativeScript toast plugin :bread:
Other
44 stars 21 forks source link

Can't change backgroundColor, textColor, Position #51

Open Anzyme opened 3 years ago

Anzyme commented 3 years ago

Hi, I'm trying this plugin on a school project but can't manage to change backgroundColor, textColor, Position, ... Nativescript : 7.1.2 Language : Angular Platform : Android 11

Here is the code I'm using : const toast = new Toasty({ text: error, position: ToastPosition.TOP, backgroundColor: new Color('RED'), textColor: ('#FF0000') }); toast.show();

I can change the text but it doesn't care about the colors or any argument I set.

Anzyme commented 3 years ago

Just tested on an emulator with Android 8 and everything works perfectly. So I guess it was and issue with Android 11 all along :/

triniwiz commented 3 years ago

Yeah the behaviour changed https://developer.android.com/about/versions/11/behavior-changes-11#text-toast-api-changes

fatrix39 commented 2 years ago

@triniwiz Are you going to solve this issue?

triniwiz commented 2 years ago

It's not possible on android 11+ using the out of box platform api since they restricted a couple things, if needed we will need to implement something custom

fatrix39 commented 2 years ago

ok, thanks. I will implement my own component in this case