Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import RNFetchBlob from 'react-native-fetch-blob';
import * as Progress from 'react-native-progress';
// components
import {Icon} from '@ui/';
import {Alert} from '@ui/alerts/';
// consts
import {AppSizes, AppStyles} from '@theme/';
// utils
import {backgroundValueCalculation} from '@lib/util';
const AnimatedImage = Animated.createAnimatedComponent(ImageBackground);
const DefaultIndicator = Progress.Circle;
const LAYOUT_ENUM = {
X: 'x',
Y: 'y'
};
const BACKGROUND_VALUES = {
MAX: 100,
MIN: 0
};
const DOUBLE_TAP_MILISECONDS = 200;
const styles = StyleSheet.create({
background: {
position: 'absolute',
{
itemData.isImage
?
{
this.setState({
isFullImage: !this.state.isFullImage,
})
}}>
this._onProgress(e.nativeEvent.loaded,e.nativeEvent.total)}
/>
: null
}
return dataSource.map((item, i) => {
console.log(item);
return (
{
navigate('WelfarePicture',{
title:'图片详情',
url:item.largeUrl,
isVisible:true
});
}}
>
<img style="{{">
);
}, this);
};
import React, { Component } from 'react';
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import Image from 'react-native-image-progress';
import * as Progress from 'react-native-progress';
const INDICATORS = [null, Progress.Bar, Progress.Circle, Progress.Pie];
const IMAGES = [
'http://www.savethecat.com/wp-content/uploads/2015/06/cats.jpg',
'http://media4.popsugar-assets.com/files/2014/08/08/878/n/1922507/caef16ec354ca23b_thumb_temp_cover_file32304521407524949.xxxlarge/i/Funny-Cat-GIFs.jpg',
'http://media1.santabanta.com/full1/Animals/Cats/cats-87a.jpg',
'http://awesomegifs.com/wp-content/uploads/cat-smacks-at-hands.gif',
];
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
image: {
const { progress } = this.state;
if (progress < 1) {
if (progressImage) {
return (
<img>
);
}
if (Platform.OS === 'android') {
return ;
}
const ProgressElement = useCircleProgress ? Progress.Circle : Progress.Bar;
return (
);
}
return null;
}
{wallsJSON.map((wallpaper, index) => {
return(
);
})}
function renderLogo(item: AppMetadata) {
if (item.package) {
return h(Image, {
source: {
uri: `http://localhost:8182/icon/${item.package}.png`,
},
style: styles.logo,
});
} else {
return h(Progress.CircleSnail, {
indeterminate: true,
size: 40,
color: palette.mainGreen,
});
}
}
h(View, { style: styles.appDetails }, [
renderTitle(item),
renderSubtitle(item),
]),
]),
]);
},
});
} else {
return placeholder;
}
}
}
const beforeReady = h(View, { style: styles.container }, [
h(Progress.CircleSnail, {
style: styles.beforeReadySpinner,
indeterminate: true,
size: 100,
color: palette.mainGreen,
}),
h(Text, { style: styles.info }, "Starting up..."),
]);
function renderWhenReady(state: State) {
return h(View, { style: styles.container }, [
h(AppList, { selector: "appList", apps: state.apps }),
h(ActionButton, {
selector: "addApp",
buttonColor: "rgb(25, 158, 51)",
}),
]);
render() {
let { fileName, style } = this.props
return (
)
}
}