Merge pull request #192 from agrass/master

fix capture method errors and preview not working
This commit is contained in:
Loch Wansbrough 2016-02-13 15:44:14 -08:00
commit bb5179afaa
3 changed files with 11 additions and 4 deletions

View File

@ -4,7 +4,8 @@ import React, {
NativeModules,
PropTypes,
StyleSheet,
requireNativeComponent
requireNativeComponent,
View,
} from 'react-native';
const CameraManager = NativeModules.CameraManager || NativeModules.CameraModule;
@ -49,6 +50,7 @@ export default class Camera extends Component {
};
static propTypes = {
...View.propTypes,
aspect: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number
@ -141,6 +143,9 @@ export default class Camera extends Component {
audio: props.captureAudio,
mode: props.captureMode,
target: props.captureTarget,
type: props.type,
title: '',
description: '',
...options
};

View File

@ -22,6 +22,7 @@ android {
}
lintOptions {
abortOnError false
warning 'InvalidPackage'
}
}
@ -30,5 +31,5 @@ repositories {
}
dependencies {
compile "com.facebook.react:react-native:0.17.+"
compile "com.facebook.react:react-native:0.19.+"
}

View File

@ -2,9 +2,10 @@ package com.lwansbrough.RCTCamera;
import android.support.annotation.Nullable;
import com.facebook.react.uimanager.*;
import com.facebook.react.uimanager.annotations.ReactProp;
public class RCTCameraViewManager extends SimpleViewManager<RCTCameraView> {
private static final String REACT_CLASS = "RCTCameraView";
public class RCTCameraViewManager extends ViewGroupManager<RCTCameraView> {
private static final String REACT_CLASS = "RCTCamera";
@Override
public String getName() {