This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Header that shrinks up and to the center as you scroll | |
To use pass in the onscroll event of a scrollview or something similar and the rest is handled | |
*/ | |
import React, { Component } from 'react'; | |
import { Text, View, StyleSheet, Dimensions, Animated, ScrollView } from 'react-native'; | |
import PropTypes from 'prop-types'; | |
import GlobalStyles from '../styles'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {View} from 'react-native'; | |
import React, { Component } from 'react'; | |
function randomColor() { | |
return '#'+Math.floor(Math.random()*16777215).toString(16); | |
} | |
export default class HelloWorld extends Component { | |
constructor() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//works for some NFI reason http://mkumaran.net/blog/2018/03/create-3d-model-in-react-native-using-webgl-and-three-js/ | |
import React, { Component } from "react"; | |
import { Platform, StyleSheet, Text, View } from "react-native"; | |
import { WebGLView } from "react-native-webgl"; | |
import 'react-native-console-time-polyfill'; | |
import THREE from "./three"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
//You should already have initialised your stack navigator and named it AppNavigator (you can call it something else just change all the references) | |
//eg. | |
const AppNavigator = StackNavigator( | |
Routes | |
); | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
Platform, | |
StyleSheet, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.facebook.react.modules.network; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import java.io.IOException; | |
import okhttp3.Interceptor; | |
import okhttp3.OkHttpClient; | |
import okhttp3.Request; | |
import okhttp3.Response; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tshirtdesignernavredux; | |
import java.util.ArrayList; | |
import java.util.List; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.shell.MainReactPackage; | |
import com.facebook.react.bridge.ModuleSpec; | |
import com.facebook.react.modules.network.NetworkingModule; | |
import com.facebook.react.modules.network.NetworkingModuleUtils; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Custom errors | |
//Documented here http://docs.brightcove.com/en/perform/brightcove-player/guides/errors-plugin.html | |
(function(videojs) { | |
var defaults = { | |
errors: { | |
1: { | |
type: "MEDIA_ERR_ABORTED", | |
headline: "The video connection was lost", | |
message: "Please check your internet connection and try again", | |
}, |