Skip to content

Commit 6b1356d

Browse files
committed
fix(core): fix for some color methods with transparent
1 parent 3766c9e commit 6b1356d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/android/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export const stateSets = {
148148

149149
let ColorStateList: typeof android.content.res.ColorStateList;
150150
export function getColorStateList(color: number) {
151-
if (!color) {
151+
if (color === undefined || color === null) {
152152
return null;
153153
}
154154
if (!ColorStateList) {
@@ -158,7 +158,7 @@ export function getColorStateList(color: number) {
158158
}
159159

160160
export function getFullColorStateList(activeColor: number, inactiveColor = 1627389952, disabledColor = 1627389952) {
161-
if (!activeColor) {
161+
if (activeColor === undefined || activeColor === null) {
162162
return null;
163163
}
164164
if (!NUtils) {
@@ -167,7 +167,7 @@ export function getFullColorStateList(activeColor: number, inactiveColor = 16273
167167
return NUtils.getFullColorStateList(activeColor, inactiveColor, disabledColor);
168168
}
169169
export function getEnabledColorStateList(color: number, disabledColor: number) {
170-
if (!color) {
170+
if (color === undefined || color === null) {
171171
return null;
172172
}
173173
if (!NUtils) {

0 commit comments

Comments
 (0)