This file contains 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 React, { Component } from 'react' | |
import { Animated, Dimensions, Image, StyleSheet, View } from 'react-native' | |
import MapView from 'react-native-maps' | |
import LinearGradient from 'react-native-linear-gradient' | |
import { Body, Card, CardItem, Header, Left, Text, Thumbnail, Title } from 'native-base' | |
import ContentComponent from './ContentComponent' | |
const {height: screenHeight, width: screenWidth} = Dimensions.get('window') | |
export default class MyApp extends Component { |
This file contains 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 React, { Component } from 'react' | |
import { Animated, Dimensions, Easing, StyleSheet, View } from 'react-native' | |
import { Transitioner } from 'react-navigation' | |
const {width: screenWidth, height: screenHeight} = Dimensions.get('window') | |
export default class BubbleTransition extends Component { | |
renderScene = ({position}, {index, key, route}) => { | |
const Page = this.props.router.getComponentForRouteName(route.routeName) | |
return <View style={StyleSheet.absoluteFill} key={key}> | |
<Page navigation={this.props.navigation}/> |
This file contains 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 React, { Component } from 'react' | |
import { presets, spring, StaggeredMotion } from 'react-motion' | |
import _ from 'lodash' | |
import { Dimensions, PanResponder, View } from 'react-native' | |
const {height: screenHeight, width: screenWidth} = Dimensions.get('window') | |
const colors = ['#F44336', '#9C27B0', '#2196F3', '#009688', '#FF9800', '#607D8B'] | |
export class ReactMotion extends Component { | |
state = { |
This file contains 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
public class GeoLocationModule extends ReactContextBaseJavaModule { | |
public GeoLocationModule(ReactApplicationContext reactContext) { | |
super(reactContext); | |
BroadcastReceiver geoLocationReceiver = new BroadcastReceiver() { | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
Location message = intent.getParcelableExtra("message"); | |
GeoLocationModule.this.sendEvent(message); | |
} | |
}; |
This file contains 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
public class GeoLocationService extends Service { | |
public static final String FOREGROUND = "com.app_name.location.FOREGROUND"; | |
private static int GEOLOCATION_NOTIFICATION_ID = 12345689; | |
LocationManager locationManager = null; | |
LocationListener locationListener = new LocationListener() { | |
@Override | |
public void onLocationChanged(Location location) { | |
GeoLocationService.this.sendMessage(location); | |
} |
This file contains 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 React, {Component} from "react"; | |
import PropTypes from "prop-types"; | |
import {Card, CardItem, Container, Content, Grid, Header, Icon, Input, Item, Row, Text, View} from "native-base"; | |
import {geocode, search} from "../../lib/Geo"; | |
import {StyleSheet, TouchableOpacity} from "react-native"; | |
import _ from "lodash"; | |
export class AddressSearch extends Component { | |
static propTypes = { | |
onSelect: PropTypes.func, |
This file contains 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
public class AlarmService extends HeadlessJsTaskService { | |
static long lastActive = 0; | |
@Override | |
protected @Nullable | |
HeadlessJsTaskConfig getTaskConfig(Intent intent) { | |
long current = System.currentTimeMillis(); | |
if ((current - lastActive) >= 30 * 1000) { | |
lastActive = current; | |
return new HeadlessJsTaskConfig( |
This file contains 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
public class Alarm extends BroadcastReceiver { | |
@Override | |
public void onReceive(final Context context, Intent intent) { | |
final Intent service = new Intent(context, AlarmService.class); | |
HeadlessJsTaskService.acquireWakeLockNow(context); | |
UiThreadUtil.runOnUiThread(new Runnable() { | |
@Override | |
public void run() { | |
context.startService(service); |
This file contains 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 React, {Component} from "react"; | |
import {Animated, Dimensions, Easing, PanResponder, StyleSheet, View} from "react-native"; | |
import {Card} from "./Card"; | |
const {width: screenWidth, height: screenHeight} = Dimensions.get("window"); | |
export class Sliding extends Component { | |
bottomPadding = 10; | |
data = new Array(20).fill({ | |
name: "John Smith", |
NewerOlder