Picker | Taking photo / video | Multi-select of items |
---|---|---|
The Gradle dependency is available via jcenter.
The minimum API level supported by this library is API 19.
The easiest way to add the Material DateTime Picker library to your project is by adding it as a dependency to your build.gradle
dependencies {
compile 'com.quanturium.android:bottomsheetpicker:2.0.1'
}
BottomSheetPicker requires some additional configurations made to your app's string and xml resources. Bottomsheetpicker uses a FileProvider which makes additional configuration necessary.
- In your manifest.xml, add the following:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="@string/file_provider_authority"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"/>
</provider>
- In your app's strings.xml file, add a string called 'file_provider_authority' and specify a value
<string name="file_provider_authority">FILE_PROVIDER_STRING_HERE</string>
- In your app's xml directory, add a new file called 'file_paths.xml' (If the xml directory does not exist, create it under the app's res/ directory). The contents of this file should look like:
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="." />
</paths>
See sample app for an example of using BottomSheetPicker with required runtime permissions.
Copyright (c) 2018 Arnaud Frugier & Steven Hong
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.