React Native Android Styles
This package allow to apply styles to specific android version.
Installation
npm i --save react-native-android-version
or
yarn add react-native-android-version
Example Usage
import AndroidVersion from "react-native-android-version";
import {StyleSheet} from "react-native";
const styles = StyleSheet.create({
image: {
...AndroidVersion.select({
'>=26': {
width: 'auto',
height: 'auto',
},
'28': {
width: 'auto',
height: 'auto',
},
25: {
width: 'auto',
height: 'auto',
},
default: {
width: '100%',
height: '100%',
}
})
}
});
Contribute
Of course, contributions welcomed! 🙌
License
MIT.