Xml Version
Bottom Dialog Android Picker
Bottom dialog picker like telegram for all version of android (1 ... , 10 , 11 , 12 , 13)
Take picture with camera and save to storage
Search in Files
Support android 10+
Expandable and scrollable dialog
Full Customisable (Color , text , minimum and maximum selected file size , ...)
No required runtime permission
Screenshots
Installation
Step 1. Add the JitPack repository to your build file
Install my project with gradle Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.mahdiasd:ComposeBottomDialogFilePicker:1.0.1'
}
Ho To Use
val isShowButtomDialog = remember { mutableStateOf(true) }
val config = PickerConfig(
currentType = PickerType.Image,
modes = listOf(PickerMode(PickerType.Image, title = "عکس")), // you can choose Image, Video, File, Audio and customize each picker mode
storageTitle = "حافظه دستگاه",
storageDescription = "برای انتخاب فایل از فایل منیجر دستگاه",
galleryTitle = "گالری",
galleryDescription = "برای انتخاب فایل از گالری دستگاه",
supportRtl = true,
maxSelection = 12,
searchTextHint = "جستجو",
searchTextHintStyle = TextStyle(textAlign = TextAlign.Right)
)
FilePickerDialog(
config = config,
onDismissDialog = { isShowButtomDialog.value = false },
selectedFiles = {
it.printToLog("selectedFiles")
}
)
Customize:
Refer to this link to learn about the parameters that can be customized: https://github.com/mahdiasd/ComposeBottomDialogFilePicker/blob/master/BottomDialogFilePicker/src/main/java/mahdiasd/bottomdialogfilepicker/PickerConfig.kt
LICENCE
Copyright 2022 Mahdi Asadollahpour BottomDialogFilePicker
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.