@hotta/react-native-imagepicker 0.2.1 → 0.2.2
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.
|
@@ -71,10 +71,12 @@ class NativeImagePickerModule(reactContext: ReactApplicationContext) :
|
|
|
71
71
|
.isDisplayCamera(isCamera)
|
|
72
72
|
.setSelectorUIStyle(getNoCountStyle())
|
|
73
73
|
.setInjectLayoutResourceListener { _, resourceSource ->
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
InjectResourceSource.
|
|
74
|
+
when (resourceSource) {
|
|
75
|
+
InjectResourceSource.MAIN_SELECTOR_LAYOUT_RESOURCE ->
|
|
76
|
+
R.layout.image_picker_fragment_selector
|
|
77
|
+
InjectResourceSource.MAIN_ITEM_VIDEO_LAYOUT_RESOURCE ->
|
|
78
|
+
R.layout.image_picker_item_grid_video
|
|
79
|
+
else -> InjectResourceSource.DEFAULT_LAYOUT_RESOURCE
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
.setImageEngine(imageEngine)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
android:layout_width="match_parent"
|
|
5
|
+
android:layout_height="match_parent">
|
|
6
|
+
|
|
7
|
+
<com.luck.picture.lib.widget.RecyclerPreloadView
|
|
8
|
+
android:id="@+id/recycler"
|
|
9
|
+
android:layout_width="match_parent"
|
|
10
|
+
android:layout_height="0dp"
|
|
11
|
+
android:overScrollMode="never"
|
|
12
|
+
app:layout_constraintBottom_toTopOf="@+id/bottom_nar_bar"
|
|
13
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
14
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
15
|
+
app:layout_constraintTop_toBottomOf="@+id/title_bar" />
|
|
16
|
+
|
|
17
|
+
<com.luck.picture.lib.widget.MediumBoldTextView
|
|
18
|
+
android:id="@+id/tv_current_data_time"
|
|
19
|
+
android:layout_width="match_parent"
|
|
20
|
+
android:layout_height="wrap_content"
|
|
21
|
+
android:alpha="0"
|
|
22
|
+
android:background="@color/ps_color_99_black"
|
|
23
|
+
android:gravity="center_vertical"
|
|
24
|
+
android:paddingStart="10dp"
|
|
25
|
+
android:paddingTop="3dp"
|
|
26
|
+
android:paddingBottom="3dp"
|
|
27
|
+
android:textColor="@color/ps_color_white"
|
|
28
|
+
android:textSize="12sp"
|
|
29
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
30
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
31
|
+
app:layout_constraintTop_toBottomOf="@+id/title_bar" />
|
|
32
|
+
|
|
33
|
+
<com.luck.picture.lib.widget.TitleBar
|
|
34
|
+
android:id="@+id/title_bar"
|
|
35
|
+
android:layout_width="0dp"
|
|
36
|
+
android:layout_height="wrap_content"
|
|
37
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
38
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
39
|
+
app:layout_constraintTop_toTopOf="parent" />
|
|
40
|
+
|
|
41
|
+
<com.luck.picture.lib.widget.BottomNavBar
|
|
42
|
+
android:id="@+id/bottom_nar_bar"
|
|
43
|
+
android:layout_width="0dp"
|
|
44
|
+
android:layout_height="wrap_content"
|
|
45
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
46
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
47
|
+
app:layout_constraintStart_toStartOf="parent" />
|
|
48
|
+
|
|
49
|
+
<!-- The list page only needs Cancel; Next is shown on the preview page. -->
|
|
50
|
+
<com.luck.picture.lib.widget.CompleteSelectView
|
|
51
|
+
android:id="@+id/ps_complete_select"
|
|
52
|
+
android:layout_width="wrap_content"
|
|
53
|
+
android:layout_height="wrap_content"
|
|
54
|
+
android:visibility="gone" />
|
|
55
|
+
|
|
56
|
+
<com.luck.picture.lib.widget.MediumBoldTextView
|
|
57
|
+
android:id="@+id/tv_data_empty"
|
|
58
|
+
android:layout_width="wrap_content"
|
|
59
|
+
android:layout_height="wrap_content"
|
|
60
|
+
android:gravity="center"
|
|
61
|
+
android:lineSpacingExtra="3dp"
|
|
62
|
+
android:text="@string/ps_empty"
|
|
63
|
+
android:textColor="@color/ps_color_aab2bd"
|
|
64
|
+
android:textSize="14sp"
|
|
65
|
+
android:visibility="gone"
|
|
66
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
67
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
68
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
69
|
+
app:layout_constraintTop_toTopOf="parent" />
|
|
70
|
+
|
|
71
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
package/lib/module/index.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import NativeImagePicker
|
|
3
|
+
import NativeImagePicker from "./NativeImagePicker.js";
|
|
4
4
|
const HTNativeImagePicker = (() => {
|
|
5
5
|
return {
|
|
6
|
-
asyncShowImagePicker:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
asyncShowVideoPicker: options => {
|
|
6
|
+
asyncShowImagePicker: NativeImagePicker.asyncShowImagePicker,
|
|
7
|
+
asyncShowVideoPicker: NativeImagePicker.asyncShowVideoPicker
|
|
8
|
+
};
|
|
9
|
+
})();
|
|
10
|
+
export default HTNativeImagePicker;
|
|
11
|
+
//# sourceMappingURL=index.js.map asyncShowVideoPicker: options => {
|
|
14
12
|
const _options = {
|
|
15
13
|
...defaultOptions,
|
|
16
14
|
...options
|