Skip to content

Commit bbf6a92

Browse files
committed
修改
1 parent e1b4d35 commit bbf6a92

File tree

6 files changed

+6
-28
lines changed

6 files changed

+6
-28
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ local.properties
3232
# node.js
3333
#
3434
node_modules/
35-
# react-native-swipeout need to modify
36-
!node_modules/react-native-swipeout/
37-
3835
npm-debug.log
3936

4037
# BUCK
4138
buck-out/
4239
\.buckd/
4340
android/app/libs
44-
android/keystores/debug.keystore
41+
android/keystores/debug.keystore

android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
<uses-permission android:name="android.permission.INTERNET" />
77
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
88

9-
10-
<uses-permission android:name="android.permission.CAMERA" />
11-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
12-
<uses-feature android:name="android.hardware.camera" android:required="true"/>
13-
<uses-feature android:name="android.hardware.camera.autofocus" />
149
<uses-sdk
1510
android:minSdkVersion="16"
1611
android:targetSdkVersion="22" />
Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.wechatarticle;
22

33
import com.facebook.react.ReactActivity;
4-
import com.imagepicker.ImagePickerPackage; // import package
54

65
public class MainActivity extends ReactActivity {
76

@@ -13,16 +12,4 @@ public class MainActivity extends ReactActivity {
1312
protected String getMainComponentName() {
1413
return "wechatArticle";
1514
}
16-
17-
/**
18-
* A list of packages used by the app. If the app uses additional views
19-
* or modules besides the default ones, add more packages here.
20-
*/
21-
@Override
22-
protected List<ReactPackage> getPackages() {
23-
return Arrays.<ReactPackage>asList(
24-
new MainReactPackage(),
25-
new ImagePickerPackage() // Add package
26-
);
27-
}
2815
}

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:1.3.1'
9-
compile project(':react-native-image-picker')
9+
1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
1212
}

android/settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
rootProject.name = 'wechatArticle'
22

33
include ':app'
4-
include ':react-native-image-picker'
5-
project(':react-native-image-picker').projectDir = new File(settingsDir, '../node_modules/react-native-image-picker/android')

src/containers/android/MessInfo.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
*/
44

55
import React, { Component } from 'react';
6-
import {View, Text,TextInput,ListView ,StyleSheet,Picker,Image,NativeModules} from "react-native";
6+
import {View, Text,TextInput,ListView ,StyleSheet,Picker,Image,NativeModules,Platform} from "react-native";
77
import DataPickerDemo from './CustomButton'
88
import Button from "react-native-button";
99
import { connect } from 'react-redux';
1010
import DatePicker from './DatePickerDemo'
1111
import articleInfoActions from '../../actions/articleInfoActions'
1212
import {bindActionCreators} from 'redux'
13-
import * as ImagePicker from 'react-native-image-picker'
13+
import ImagePicker from 'react-native-image-picker'
1414

1515

1616

@@ -256,7 +256,8 @@ class MessInfo extends React.Component {
256256
<Text style={styles.textTitle}>图片文章:</Text>
257257
</View>
258258
<View>
259-
<Image source={{uri:this.state.infoData.image}} onLoad={this.onToImage} style={styles.uploadAvatar} />
259+
<Image source={{uri:this.state.infoData.image}} style={styles.uploadAvatar} />
260+
<Text onPress={this.onToImage}>选择图片</Text>
260261
</View>
261262
</View>
262263

0 commit comments

Comments
 (0)