adds support for a similar functionality as <Image capInsets={...} />
to android.
behind the scenes it will generate a NinePatchDrawable
and set as background for the android ImageView
npm i --save react-native-image-capinsets
react-native link react-native-image-capinsets
Android resource:
import ImageCapInset from 'react-native-image-capinsets';
<ImageCapInset
source={require('./bubble.png')}
capInsets={{ top: 8, right: 8, bottom: 8, left: 8 }}
/>
Local file:
<ImageCapInset source={{uri: "/data/user/0/com.example/files/content/test.png"}}
resizeMode="stretch"
capInsets={{top: 8, right: 8, bottom: 8, left: 8}}
/>
Remote file:
<ImageCapInset source={{uri: "https://examplesite.com/test.png"}}
resizeMode="stretch"
capInsets={{top: 8, right: 8, bottom: 8, left: 8}}
/>