mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
revert D2631410
Differential Revision: D2655673 fb-gh-sync-id: 115247373767690e63a0d6ce812a578d26b47289
This commit is contained in:
committed by
facebook-github-bot-5
parent
e406dccaf9
commit
39ec693866
@@ -18,7 +18,6 @@
|
||||
var React = require('react-native');
|
||||
var {
|
||||
PixelRatio,
|
||||
ProgressBarAndroid,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
@@ -62,6 +61,7 @@ class Downloader extends React.Component {
|
||||
this.setState({
|
||||
downloaded: xhr.responseText.length,
|
||||
});
|
||||
console.log(xhr.responseText.length);
|
||||
} else if (xhr.readyState === xhr.DONE) {
|
||||
if (this.cancelled) {
|
||||
this.cancelled = false;
|
||||
@@ -83,8 +83,6 @@ class Downloader extends React.Component {
|
||||
}
|
||||
};
|
||||
xhr.open('GET', 'http://www.gutenberg.org/cache/epub/100/pg100.txt');
|
||||
// Avoid gzip so we can actually show progress
|
||||
xhr.setRequestHeader('Accept-Encoding', '');
|
||||
xhr.send();
|
||||
this.xhr = xhr;
|
||||
|
||||
@@ -116,8 +114,6 @@ class Downloader extends React.Component {
|
||||
return (
|
||||
<View>
|
||||
{button}
|
||||
<ProgressBarAndroid progress={(this.state.downloaded / this.state.contentSize)}
|
||||
styleAttr="Horizontal" indeterminate={false} />
|
||||
<Text>{this.state.status}</Text>
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user