INNER CODE UNIT · TypeScript

adjustedWidth

hoaphantn7604/react-native-element-dropdown · src/toolkits/index.ts:8

  const adjustedWidth = width * pixelDensity;
  const adjustedHeight = height * pixelDensity;
  if (pixelDensity < 2 && (adjustedWidth >= 1000 || adjustedHeight >= 1000)) {
    return true;
  } else {
    return (
      pixelDensity === 2 && (adjustedWidth >= 1824 || adjustedHeight >= 1824)
    );
  }
};

const useDetectDevice: IUseDetectDevice = {
  isAndroid: Platform.OS === 'android',
  isIOS: Platform.OS === 'ios',
  isTablet: isTablet(),
};

export { useDetectDevice };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…