Skip to content

Commit

Permalink
added login and home screen
Browse files Browse the repository at this point in the history
  • Loading branch information
triandicAnt committed Jul 4, 2016
1 parent 1ef4668 commit b61703a
Show file tree
Hide file tree
Showing 40 changed files with 1,114 additions and 142 deletions.
11 changes: 8 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ import com.android.build.OutputFile
* extraPackagerArgs: []
* ]
*/

project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // font filenames
]
apply from: "../../node_modules/react-native/react.gradle"

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
Expand Down Expand Up @@ -126,10 +128,13 @@ android {
}

dependencies {
// compile project(':react-native-webview-android')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':RNWebView')
// compile project(':RNWebView')
compile project(':react-native-vector-icons')
}

// Run this once to be able to run the application with BUCK
Expand Down
Binary file added android/app/src/main/assets/fonts/Entypo.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/EvilIcons.ttf
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Foundation.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Ionicons.ttf
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Octicons.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Zocial.ttf
Binary file not shown.
8 changes: 6 additions & 2 deletions android/app/src/main/java/com/moviereview/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.moviereview;

import com.facebook.react.ReactActivity;
// import com.burnweb.rnwebview.RNWebViewPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.burnweb.rnwebview.RNWebViewPackage;
// import com.burnweb.rnwebview.RNWebViewPackage;
import java.util.Arrays;
import java.util.List;

Expand Down Expand Up @@ -35,7 +37,9 @@ protected boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNWebViewPackage()
// new RNWebViewPackage(),
new VectorIconsPackage()
// new RNWebViewPackage()
);
}
}
2 changes: 2 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<resources>


<string name="app_name">MovieReview</string>
</resources>
10 changes: 8 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
rootProject.name = 'MovieReview'

include ':app'
include ':RNWebView', ':app'
project(':RNWebView').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview-android/android')
// include ':react-native-webview-android'
// project(':react-native-webview-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview-android/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
// include ':RNWebView', ':app'
// project(':RNWebView').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview-android/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
11 changes: 9 additions & 2 deletions backup/index.android.bkp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

/*
import React, { Component } from 'react';
import {
AppRegistry,
Expand All @@ -11,7 +11,7 @@ import {
TouchableHighlight
}from 'react-native';
var VideoWebView = require('./VideoWebView');
var WebViewAndroid = require('react-native-webview-android');
// var WebViewAndroid = require('react-native-webview-android');
var MovieReview = React.createClass({
_renderScene(route, navigator) {
Expand Down Expand Up @@ -156,3 +156,10 @@ var styles = StyleSheet.create({
});
AppRegistry.registerComponent('MovieReview', () => MovieReview);
------------
import { AppRegistry } from 'react-native'
import setup from './js/setup'
*/
28 changes: 23 additions & 5 deletions components/home.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { View } from 'react-native';
import { Actions } from 'react-native-router-flux';

import {Container, Header, Title, Content, Text, Button, Icon } from 'native-base';
import styles from './styles';
export default class Home extends Component {
render() {
const goToPage = () => Actions.page({text: 'Hello World!'});
return (
<View style={{margin: 128}}>
<Text onPress={goToPage}>This is Page !</Text>
</View>
<Container style={{backgroundColor: '#565051'}}>
<Header style={{backgroundColor: '#322A2A'}} foregroundColor="#fff" >
<Button disabled transparent>
<Icon name="ios-arrow-back" />
</Button>

<Title>Home</Title>

<Button transparent onPress={this.props.openDrawer}>
<Icon name="ios-menu" />
</Button>
</Header>

<Content padder>
<Text style={styles.text}>Welcome!</Text>
<Button style={styles.text} onPress={() => this.replaceRoute('login')}>
Logout
</Button>
</Content>
</Container>
)
}
}
14 changes: 0 additions & 14 deletions components/page.js

This file was deleted.

Binary file added images/movies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 4 additions & 50 deletions index.android.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,8 @@
'use strict';

import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Navigator,
WebView,
TouchableHighlight
}from 'react-native';
import { AppRegistry } from 'react-native'
import setup from './js/setup'

import { Router, Scene } from 'react-native-router-flux';
import Page from './components/page';
import Home from './components/home';
// AppRegistry.registerComponent('MovieReview', () => MovieReview);
AppRegistry.registerComponent('MovieReview', setup);


var MovieReview = React.createClass({
render() {
return (
<Router sceneStyle={{backgroundColor:'#b2d8d9'}}>
<Scene key="root" navigationBarStyle={{backgroundColor:'#36A99E'} } titleStyle={{color:"white"}}>
<Scene key="home" component={Home} title="Home" initial={true} />
<Scene key="page" component={Page} title="Page" />
</Scene>
</Router>
)
}

});


var styles = StyleSheet.create({
container: {
flex: 1,
marginTop:60
},
button: {
height: 50,
backgroundColor: '#ededed',
marginTop: 10,
justifyContent: 'center',
alignItems: 'center'
},
containerWebView: {
flex: 1,
},
navigate:{
backgroundColor: '#2CC0B3'
}
});

AppRegistry.registerComponent('MovieReview', () => MovieReview);
Loading

0 comments on commit b61703a

Please sign in to comment.