File tree Expand file tree Collapse file tree 4 files changed +23
-5
lines changed
src/main/java/com/github/file_picker Expand file tree Collapse file tree 4 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1+ Copyright 2022 Majid Arabi.
2+
3+ Licensed under the Apache License, Version 2.0 (the "License");
4+ you may not use this file except in compliance with the License.
5+ You may obtain a copy of the License at
6+
7+ http://www.apache.org/licenses/LICENSE-2.0
8+
9+ Unless required by applicable law or agreed to in writing, software
10+ distributed under the License is distributed on an "AS IS" BASIS,
11+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ See the License for the specific language governing permissions and
13+ limitations under the License.
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ afterEvaluate {
5858 from components. release
5959 groupId = ' com.github.majidarabi'
6060 artifactId = ' file-picker'
61- version = ' 0.0.5 '
61+ version = ' 0.0.6 '
6262 }
6363 }
6464 }
Original file line number Diff line number Diff line change @@ -224,7 +224,6 @@ class FilePicker : BottomSheetDialogFragment() {
224224 private fun loadFiles () = CoroutineScope (Dispatchers .IO ).launch {
225225 val files = getStorageFiles(fileType = fileType)
226226 .map { Media (file = it) }
227- .sortedByDescending { it.file.lastModified() }
228227
229228 selectedFiles.forEach { media ->
230229 files.forEach {
@@ -342,8 +341,11 @@ class FilePicker : BottomSheetDialogFragment() {
342341/* *
343342 * Show file picker
344343 *
345- * @param title
346- * @param submitText
344+ * @param title the bottom sheet dialog title
345+ * @param titleTextColor the bottom sheet dialog title text color
346+ * @param submitText the submit button text
347+ * @param submitTextColor the submit button text color
348+ * @param accentColor the accent color using in submit button background color, progress bar color, selected item color.
347349 * @param fileType
348350 * @param listDirection
349351 * @param cancellable
@@ -388,7 +390,10 @@ fun AppCompatActivity.showFilePicker(
388390 * Show file picker
389391 *
390392 * @param title
393+ * @param titleTextColor
391394 * @param submitText
395+ * @param submitTextColor
396+ * @param accentColor
392397 * @param fileType
393398 * @param listDirection
394399 * @param cancellable
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ fun Activity.getStorageFiles(
2626 columns,
2727 null ,
2828 null ,
29- null
29+ MediaStore . Images . ImageColumns . DATE_MODIFIED + " DESC "
3030 )
3131 // Total number of images
3232 val count = cursor?.count ? : return arrayListOf ()
You can’t perform that action at this time.
0 commit comments