![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@unpourtous/react-native-responsive-image
Advanced tools
responsive image component for react-native
you can just set one of width or height, then another will responsive by image ratio.
$ npm install @unpourtous/react-native-responsive-image --save
screen shot:
source code:
import React from 'react'
import {
ScrollView,
View,
Text,
Image
} from 'react-native'
import ResponsiveImage from '@unpourtous/react-native-responsive-image'
export default class Demo extends React.Component {
render () {
return <ScrollView>
<Text>image size: width 200, height 100</Text>
<Text>box size: width 300, height 100</Text>
<Text>Use ResponsiveImage: width=300*80%=240 => height=width/2=120</Text>
<View style={{
marginTop: 5,
marginBottom: 20,
width: 300,
borderColor: 'lightgray',
borderWidth: 10,
justifyContent: 'center',
alignItems: 'center'
}}>
<ResponsiveImage
source={require('./test.png')}
width={'80%'}
/>
</View>
<Text>Use Image: width=300*80%=240 => height=100</Text>
<View style={{
marginTop: 5,
marginBottom: 20,
width: 300,
borderColor: 'lightgray',
borderWidth: 10,
justifyContent: 'center',
alignItems: 'center'
}}>
<Image
source={require('./test.png')}
style={{
width: '80%'
}}
/>
</View>
<Text>Use ResponsiveImage: height=100*50%=50 => width=height*2=100</Text>
<View style={{
marginTop: 5,
marginBottom: 20,
width: 300,
height: 100,
borderColor: 'lightgray',
borderWidth: 10,
justifyContent: 'center',
alignItems: 'center'
}}>
<ResponsiveImage
source={require('./test.png')}
height={'50%'}
/>
</View>
<Text>Use Image: height=100*50%=50 => width=200</Text>
<View style={{
marginTop: 5,
marginBottom: 20,
width: 300,
height: 100,
borderColor: 'lightgray',
borderWidth: 10,
justifyContent: 'center',
alignItems: 'center'
}}>
<Image
source={require('./test.png')}
style={{
height: '50%'
}}
/>
</View>
</ScrollView>
}
}
height
: set image's height, number or stringwidth
: set image's width, number or stringstyle
: for native View componentsource
FAQs
responsive image component for react-native
The npm package @unpourtous/react-native-responsive-image receives a total of 1 weekly downloads. As such, @unpourtous/react-native-responsive-image popularity was classified as not popular.
We found that @unpourtous/react-native-responsive-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.