@@ -12,13 +12,14 @@ data class FilePicker(
12
12
private val fragmentManager : FragmentManager ,
13
13
var listener : FilePickerListener ? = null ,
14
14
15
- var mode : List <PickerMode > = listOf(PickerMode .Image , PickerMode .Video , PickerMode .Audio ),
15
+ var mode : List <PickerMode > = listOf(PickerMode .Image , PickerMode .Image , PickerMode . Video , PickerMode .Audio ),
16
16
private var defaultMode : PickerMode ? = null ,
17
17
18
18
var videoText : String = context.getString(R .string.mahdiasd_file_picker_video),
19
19
var audioText : String = context.getString(R .string.mahdiasd_file_picker_audio),
20
20
var fileManagerText : String = context.getString(R .string.mahdiasd_file_picker_file_manager),
21
21
var imageText : String = context.getString(R .string.mahdiasd_file_picker_image),
22
+ var cameraText : String = context.getString(R .string.mahdiasd_file_picker_camera),
22
23
var openStorageText : String = context.getString(R .string.mahdiasd_file_picker_open_storage),
23
24
var maxTotalFileSizeText : String = context.getString(R .string.mahdiasd_file_picker_max_total_size),
24
25
var maxEachFileSizeText : String = context.getString(R .string.mahdiasd_file_picker_max_each_size),
@@ -28,6 +29,8 @@ data class FilePicker(
28
29
var documentIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_document),
29
30
var fileManagerIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_file),
30
31
var imageIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_image),
32
+ var searchIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_search),
33
+ var doneIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_send),
31
34
32
35
var showFileWhenClick : Boolean = false ,
33
36
var maxSelection : Int = 10 ,
@@ -38,7 +41,9 @@ data class FilePicker(
38
41
var activeColor : Int = ContextCompat .getColor(context, R .color.colorPrimary),
39
42
var deActiveColor : Int = ContextCompat .getColor(context, R .color.gray),
40
43
var cardBackgroundColor : Int = ContextCompat .getColor(context, R .color.white),
41
- ) :
44
+
45
+
46
+ ) :
42
47
BaseObservable () {
43
48
private val fragmentTag = " mahdiasd_file_picker"
44
49
private var filePickerFragment = FilePickerFragment .newInstance()
@@ -62,12 +67,17 @@ data class FilePicker(
62
67
documentIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_document),
63
68
fileManagerIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_file),
64
69
imageIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_image),
70
+ doneIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_send),
71
+ searchIcon : Drawable ? = ContextCompat .getDrawable(context, R .drawable.ic_search),
65
72
): FilePicker {
66
- this .videoIcon
67
- this .audioIcon
68
- this .documentIcon
69
- this .fileManagerIcon
70
- this .imageIcon
73
+ this .searchIcon = searchIcon
74
+ this .videoIcon = videoIcon
75
+ this .audioIcon = audioIcon
76
+ this .documentIcon = documentIcon
77
+ this .fileManagerIcon = fileManagerIcon
78
+ this .imageIcon = imageIcon
79
+ this .doneIcon = doneIcon
80
+
71
81
return this
72
82
}
73
83
@@ -141,6 +151,7 @@ data class FilePicker(
141
151
audioText : String = context.getString(R .string.mahdiasd_file_picker_audio),
142
152
fileManagerText : String = context.getString(R .string.mahdiasd_file_picker_file_manager),
143
153
imageText : String = context.getString(R .string.mahdiasd_file_picker_image),
154
+ cameraText : String = context.getString(R .string.mahdiasd_file_picker_camera),
144
155
openStorageText : String = context.getString(R .string.mahdiasd_file_picker_open_storage),
145
156
maxTotalFileSizeText : String = context.getString(R .string.mahdiasd_file_picker_max_total_size),
146
157
maxEachFileSizeText : String = context.getString(R .string.mahdiasd_file_picker_max_each_size),
@@ -149,6 +160,7 @@ data class FilePicker(
149
160
this .audioText = audioText
150
161
this .fileManagerText = fileManagerText
151
162
this .imageText = imageText
163
+ this .cameraText = cameraText
152
164
this .openStorageText = openStorageText
153
165
this .maxTotalFileSizeText = maxTotalFileSizeText
154
166
this .maxEachFileSizeText = maxEachFileSizeText
0 commit comments