Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customloader #112

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
third-party

# Android/IntelliJ
#
Expand Down
2 changes: 2 additions & 0 deletions EpubReader/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Epub, Streamer } from "epubjs-rn";
import TopBar from './app/TopBar'
import BottomBar from './app/BottomBar'
import Nav from './app/Nav'
import CustomLoading from './Loading';

class EpubReader extends Component {
constructor(props) {
Expand Down Expand Up @@ -119,6 +120,7 @@ class EpubReader extends Component {
onError={(message) => {
console.log("EPUBJS-Webview", message);
}}
loadingView={<CustomLoading />}
/>
<View
style={[styles.bar, { top:0 }]}>
Expand Down
17 changes: 17 additions & 0 deletions EpubReader/Loading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React, { Component } from 'react';
import * as Animatable from 'react-native-animatable';
let img = require("./asset/book.png")

export default class CustomLoading extends Component {
constructor(props) {
super(props);
this.state = {
};
}

render() {
return (
<Animatable.Image animation="slideInDown" duration={500} iterationCount="infinite" direction="alternate" source={img} />
);
}
}
Binary file added EpubReader/asset/book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -29,6 +39,11 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
Loading