ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

RadCalendar Android: this.nativeView.setForceDarkAllowed is not a function #1518

Open Guervyl opened 3 years ago

Guervyl commented 3 years ago

Tell us about the problem

RadCalendar Android: this.nativeView.setForceDarkAllowed is not a function

Which platform(s) does your issue occur on?

Android 10, 11

Please provide the following version numbers that your issue occurs with:

Please tell us how to recreate the issue in as much detail as possible.

When running the app on emulators of android 10, android 11 I got the error this._nativeView.setForceDarkAllowed is not a function. On my phisical phone Android 6, I don't get this error.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

It's just about rendering the RadCalendar

Guervyl commented 3 years ago

I fixed the issue by setting

if (isAndroid) {
            try {
                Theme.setMode(Theme.Light);
            } catch (e) {
                console.log("Error setting Theme to light mode", e);
            }
        }

However if I want dark mode the app will crash.