nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
218 stars 80 forks source link

android only: ui-material-tabs > 6.2.20 breaks nativescript-ui-calendar #372

Open cjohn001 opened 2 years ago

cjohn001 commented 2 years ago

I have a nativescrip-ui-calender in a page displayed within the ui-material-tabs. On Android, the styles of the calendar are broken when it is loaded. In addition to the basic styles I am configuring some parameters of the calendar in the loaded event

    if (global.isAndroid) {
        // disable gestures to switch between view modes
        const gestureManager = this._radCalendar.nativeView.getGestureManager();
        gestureManager.setPinchOpenToChangeDisplayMode(false);
        gestureManager.setPinchCloseToChangeDisplayMode(false);
        gestureManager.setSwipeUpToChangeDisplayMode(false);
        gestureManager.setSwipeDownToChangeDisplayMode(false);
        gestureManager.setTapToChangeDisplayMode(false);
        gestureManager.setDoubleTapToChangeDisplayMode(false);
        this._radCalendar.android.setDayNamesHeight(Utils.layout.toDevicePixels(18));
        this._radCalendar.android.setTitleHeight(30 * Screen.mainScreen.scale);
        this._radCalendar.android.setInOriginalSizeForAllModes(true);
    }

The following lines result in the calendar disappearing at all this._radCalendar.android.setDayNamesHeight(Utils.layout.toDevicePixels(18)); this._radCalendar.android.setTitleHeight(30 * Screen.mainScreen.scale); this._radCalendar.android.setInOriginalSizeForAllModes(true); Seems like the view layout is not correctly updated when it is in a page displayed in the tabs component

Which platform(s) does your issue occur on?

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

farfromrefug commented 2 years ago

@cjohn001 this issue should be reported in the calendar plugin. i cant support any of the ui plugin as they are closed source.

cjohn001 commented 2 years ago

@farfromrefug : I am rather sure that this is a problem related to the rewrite of the android version of MDTabs. On MDTabs till version 6.2.20 this works as expected and I am using the calendar plugin in at least 5 different pages in the same app ,exactly same source as on the MDTabs page, without issues

farfromrefug commented 2 years ago

@cjohn001 yes you are right it is related to that change. we now use the normal fragment technique . now if you say.that the calendar works without calling those lines then i can it should be reported in the calendar repo. again as they are closed source i have no idea of what s happening behind and i can neither say the issue is here nor fix it