Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons Ok and Cancel are invisible (color = background) #59

Open
hooliapps opened this issue Apr 8, 2022 · 2 comments
Open

Buttons Ok and Cancel are invisible (color = background) #59

hooliapps opened this issue Apr 8, 2022 · 2 comments
Labels

Comments

@hooliapps
Copy link

hooliapps commented Apr 8, 2022

Describe the bug
I get some users who have the following problem:
Buttons Ok and Cancel are invisible (color = background)

If they click on the expected location of the bottom, it works.

To Reproduce

The problem occured on a Samsung Galaxy S20 Plus (Android 12) + at least one other device.
The problem don't occurs for the majority of users.

Expected behavior

Button ok and cancel must be visible.

Screenshots
The error:
Screenshot_20220408-083357_Planningify (1)

Expected result:
android12

Cordova
List Cordova versions by running:

  • cordova -v
  • 10.0.0
  • cordova platform ls
  • Installed platforms:
    android 9.1.0

Plugin version
2.1.2

Development OS (please complete the following information):

  • OS: Android

Device (please complete the following information):

  • Device: Samsung Galaxy S20 Plus
  • OS: Android 12

Additional context
Cordova plugin:

Code:
cordova.plugins.DateTimePicker.show({
locale: elemId.includes('breaks') ? 'fr_FR' : null,
titleText: dateTimePickerTitleText,
mode: 'time',
date: theCurrentDate,
cancelText: A.i18n['cancel'],
clearText: showClearButton ? A.i18n['empty'] : null,
okText: 'OK',
android: {
is24HourView: ENV_TIME_24H || elemId.includes('breaks')
},
success: function(newDate) {
...
}
});

@hooliapps hooliapps added the bug label Apr 8, 2022
@hooliapps
Copy link
Author

For info, i saw that some Smartphone (ex Samsung S20 Plus) can have some wrong colors (default R.style can be overwritted).

To "correct" this, i did the following steps.

config.xml



styles.xml

<style name="MyAppTheme" parent="android:Theme.DeviceDefault.NoActionBar"> #D3E3FD </style>

Then, i add android: {theme:0} in the source code

@skwasjer
Copy link
Owner

Great that you found the fix. I am not sure if we can do anything about it from the perspective of the plugin itself as it merely spawns the native picker on Android.

See also this guide on how to adjust themes (which is not exclusive or specific to this plugin). https://github.com/skwasjer/skwas-cordova-plugin-datetimepicker/blob/main/docs/Android_custom_theme_and_styling.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants