@hotta/react-native-imagepicker 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
<application>
|
|
3
|
+
<activity
|
|
4
|
+
android:name="com.luck.picture.lib.basic.PictureSelectorSupporterActivity"
|
|
5
|
+
android:screenOrientation="portrait" />
|
|
6
|
+
<activity
|
|
7
|
+
android:name="com.luck.picture.lib.basic.PictureSelectorTransparentActivity"
|
|
8
|
+
android:screenOrientation="portrait" />
|
|
9
|
+
</application>
|
|
2
10
|
</manifest>
|
|
@@ -39,9 +39,17 @@ class NativeImagePickerModule(reactContext: ReactApplicationContext) :
|
|
|
39
39
|
promise: Promise?
|
|
40
40
|
) {
|
|
41
41
|
pickerOptions = options;
|
|
42
|
+
val imageCount = options?.getInt("imageCount") ?: 1
|
|
43
|
+
val isCamera = options?.getBoolean("isCamera") ?: false
|
|
42
44
|
PictureSelector.create(reactApplicationContext.currentActivity)
|
|
43
45
|
.openGallery(SelectMimeType.ofImage())
|
|
44
46
|
.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
|
|
47
|
+
.setSelectionMode(
|
|
48
|
+
if (imageCount > 1) SelectModeConfig.MULTIPLE else SelectModeConfig.SINGLE
|
|
49
|
+
)
|
|
50
|
+
.setMaxSelectNum(imageCount)
|
|
51
|
+
.isDisplayCamera(isCamera)
|
|
52
|
+
.setSelectorUIStyle(getNoCountStyle())
|
|
45
53
|
.setImageEngine(imageEngine)
|
|
46
54
|
.forResult(object : OnResultCallbackListener<LocalMedia> {
|
|
47
55
|
override fun onResult(localMediaList: ArrayList<LocalMedia?>?) {
|
|
@@ -106,7 +114,7 @@ class NativeImagePickerModule(reactContext: ReactApplicationContext) :
|
|
|
106
114
|
// 隐藏选择后的数字/角标索引
|
|
107
115
|
isSelectNumberStyle = false
|
|
108
116
|
isPreviewSelectNumberStyle = false
|
|
109
|
-
//
|
|
117
|
+
// 预览页点击“下一步”时,自动选择当前媒体并返回
|
|
110
118
|
isCompleteSelectRelativeTop = true
|
|
111
119
|
// 隐藏列表页和预览页的勾选按钮
|
|
112
120
|
selectBackground = android.R.color.transparent
|
package/lib/module/index.js
CHANGED
|
@@ -8,14 +8,4 @@ const HTNativeImagePicker = (() => {
|
|
|
8
8
|
};
|
|
9
9
|
})();
|
|
10
10
|
export default HTNativeImagePicker;
|
|
11
|
-
//# sourceMappingURL=index.js.map asyncShowVideoPicker: options => {
|
|
12
|
-
const _options = {
|
|
13
|
-
...defaultOptions,
|
|
14
|
-
...options
|
|
15
|
-
};
|
|
16
|
-
return NativeImagePicker.asyncShowVideoPicker(_options);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
})();
|
|
20
|
-
export default HTNativeImagePicker;
|
|
21
11
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeImagePicker","
|
|
1
|
+
{"version":3,"names":["NativeImagePicker","HTNativeImagePicker","asyncShowImagePicker","asyncShowVideoPicker"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,iBAAiB,MAAM,wBAAqB;AAEnD,MAAMC,mBAAmB,GAAG,CAAC,MAAM;EACjC,OAAO;IACLC,oBAAoB,EAAEF,iBAAiB,CAACE,oBAAoB;IAC5DC,oBAAoB,EAAEH,iBAAiB,CAACG;EAC1C,CAAC;AACH,CAAC,EAAE,CAAC;AAEJ,eAAeF,mBAAmB","ignoreList":[]}
|