Content-Length: 285444 | pFad | http://github.com/NativeScript/plugins/commit/5b4822ab9dd7501259dd6e2c7ef7826ed25a7d69

65 fix(datetimepicker): spinner color not applied on Android 29+ (#620) · NativeScript/plugins@5b4822a · GitHub
Skip to content

Commit 5b4822a

Browse files
authored
fix(datetimepicker): spinner color not applied on Android 29+ (#620)
1 parent 0145aba commit 5b4822a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/datetimepicker/index.android.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Color } from '@nativescript/core';
1+
import { Color, Device } from '@nativescript/core';
22
import { DatePickerOptions, DateTimePickerBase, DateTimePickerStyleBase, PickerOptions, TimePickerOptions } from './common';
33
import { getDateNow, getDateToday, LocalizationUtils } from './utils';
44
export * from './ui';
@@ -274,6 +274,11 @@ export class DateTimePicker extends DateTimePickerBase {
274274
}
275275

276276
private static _applyNumberPickerColor(numberPicker: android.widget.NumberPicker, color: Color) {
277+
const sdkVersionInt = parseInt(Device.sdkVersion, 10);
278+
if (sdkVersionInt >= 29) {
279+
numberPicker.setTextColor(color.android);
280+
return;
281+
}
277282
const wheelPaint = DateTimePicker._findFieldByName(numberPicker, 'mSelectorWheelPaint');
278283
const selectionDividerDrawable = DateTimePicker._findFieldByName(numberPicker, 'mSelectionDivider');
279284
if (!wheelPaint || !selectionDividerDrawable || !(wheelPaint instanceof android.graphics.Paint) || !(selectionDividerDrawable instanceof android.graphics.drawable.Drawable)) {

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/NativeScript/plugins/commit/5b4822ab9dd7501259dd6e2c7ef7826ed25a7d69

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy