Comments (6)
do you have an example that reproduce the problem?
from react-native-view-shot.
Yes Here find the sample code.
<View style={{marginHorizontal:(Screen.width/100)1.5,
backgroundColor: 'transparent',
borderTopWidth:1,
borderColor:"#C0C0C0",
marginTop:(Screen.height/100)-1,
paddingVertical:(Screen.height/100)*1.3,
alignItems:"center"
}} >
<TouchableHighlight style={{position:'absolute',
left:(Screen.width/100)*20,
alignItems: 'center',
height:(Screen.width/100)*15,
width:(Screen.width/100)*20,}}
underlayColor = "transparent"
onPress={()=>this.socialMediaShare(rowdata)}>
<Image
style={[CommonStyle.message_board_bottom_icons,{marginTop:7,
width:(Screen.width/100)*7.2,height:(Screen.width/100)*7.22,}]}
source={share_icon}
/>
socialMediaShare (refname) {
let context=this;
console.log("refname",refname);
context.setTimeout(function(){
takeSnapshot(context.refs[refname], {
format: "jpeg",
quality: 1,
path: PictureDir+"/screenShot.png"
})
.then(
uri => context.setUri(uri),
error => {
console.log("Oops, snapshot failed", error);
//Toast.show("Your device does not support this feature.");
}
);
},200);
}
from react-native-view-shot.
Where is your ref set?
is it on a View, if so, have you tried to set collapsable={false}
on it?
from react-native-view-shot.
@gre ref id is set to view and view is set to collapsable={false} already.
from react-native-view-shot.
@gre just fixed the issue. This is happening because when we are saving images to path: PictureDir. We need to get the storage permissions from user else package throw errors
Thanks
from react-native-view-shot.
@imbudhiraja What permissions do you use?
from react-native-view-shot.
Related Issues (20)
- Sharing to different apps HOT 1
- react-native-view-shot error: failed to capture view snapshot on android with MaskedView from '@react-native-community/masked-view'
- FlatList inside a View HOT 1
- React-native 0.72 requires higher minimum SDK version for windows.
- Getting blank screen when capturing video playing under webview.
- Getting blank screen when capturing video playing under webview. HOT 4
- Image Quality is too low while i am taking view shot of my screen
- White borders when view dimensions are not integers
- Crash error on android HOT 5
- not working on ios RN0.72.4
- newArchEnabled HOT 1
- Viewshot is not capture screen shot of absolute positioned Views/
- Is this package still maintained?, because it doesn't seem to work on android anymore HOT 2
- Run time crash due to use of depricated UI Image apis
- not working on android React-Native 0.7x HOT 1
- In scrollable content when i take a shot end of the content styles not applied example borderRadius and color and border
- Android: Image is coming partially black on Android when used in conjunction with ScrollView! HOT 1
- how to avoid black edges formed after capturing. HOT 1
- Regression in 4.0.0-alpha.2 HOT 1
- In android it does nothing and not showing any error logs. Works fine in iOS HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-view-shot.