Override one or more ui attributes from the attr.xml's picker activity UI attribute section. For example,
<style name="CustomSSImagePicker" parent="SSImagePicker">
<item name="ssToolbarBackIcon">@drawable/ic_arrow_back_ios</item>
<item name="ssPickerGridCount">3</item>
<item name="ssToolbarDoneTextAppearance">@style/CustomDoneTextAppearance</item>
</style>
<!-- If you only want to change some values for a particular attribute it is better to add deafult style of that attribute as parent style. Here SSToolbarDoneTextAppearance is default style for toolbar's done text. You can avoid including parent style also and completely re-write your own defination of toolbar's done text's text appearance-->
<style name="CustomDoneTextAppearance" parent="SSToolbarDoneTextAppearance">
<item name="android:textColor">@color/black</item>
<item name="android:textSize">@dimen/_13ssp</item>
<item name="android:fontFamily">@font/poppins_medium</item>
</style>
<!-- Without parent style. This is also valid. It will remove all the parent values for that style. -->
<style name="CustomDoneTextAppearance">
<item name="android:textColor">@color/black</item>
<item name="android:textSize">@dimen/_13ssp</item>
<item name="android:fontFamily">@font/poppins_medium</item>
</style>
Set your custom theme into AndroidManifest.xml where you have defined the ImagePickerActivity
To customize Picker Option Bottom Sheet UI, override the default bottom sheet theme SSImagePickerBaseBottomSheetDialog in your styles.xml or themes.xml. Make sure that the parent theme is set to SSImagePickerBaseBottomSheetDialog.
Override one or more bottom sheet picker option ui attributes from attr.xml's bottom sheet attributes section. For example,
<style name="CustomPickerBottomSheet" parent="SSImagePickerBaseBottomSheetDialog">
<item name="ssSheetCameraViewStyle">@style/PickerBottomSheetText</item>
<item name="ssSheetGalleryViewStyle">@style/PickerBottomSheetText</item>
<item name="ssSheetCancelViewStyle">@style/PickerBottomSheetText</item>
</style>
<!-- If you only want to change some values for a particular attribute it is better to add deafult style of that attribute as parent style. Here SSBottomSheetTextViewStyle is default style for picker bottom sheet's text button. You can avoid including parent style also and completely re-write your own defination of picker bottom sheet's text button-->
<style name="PickerBottomSheetText" parent="SSBottomSheetTextViewStyle">
<item name="android:fontFamily">@font/poppins_medium</item>
<item name="android:textColor">@color/color_text</item>
<item name="android:textSize">@dimen/_15ssp</item>
</style>
<!-- Without parent style. This is also valid. It will remove all the parent values for that style. -->
<style name="PickerBottomSheetText">
<item name="android:textColor">@color/black</item>
<item name="android:textSize">@dimen/_13ssp</item>
<item name="android:fontFamily">@font/poppins_medium</item>
</style>
Pass the custom style while creating the bottom sheet instance.
val fragment = SSPickerOptionsBottomSheet.newInstance(R.style.CustomPickerBottomSheet)
fragment.show(supportFragmentManager,SSPickerOptionsBottomSheet.BOTTOM_SHEET_TAG)
Add a new ImagePickerActivity layout to display the list of images with folders support.
Part -2 contains the files related to the new image picker's layouts, theme, and attribute changes.
New Features :
File Changes:
:heavy_minus_sign: Removed
:construction: Modified
:books: Usage:
Picker activity screen
To customize UI, override the default SSImagePicker theme in your styles.xml or themes.xml. Make sure that the parent theme is set to SSImagePicker.
Override one or more ui attributes from the attr.xml's picker activity UI attribute section. For example,
Picker option bottom sheet
To customize Picker Option Bottom Sheet UI, override the default bottom sheet theme SSImagePickerBaseBottomSheetDialog in your styles.xml or themes.xml. Make sure that the parent theme is set to SSImagePickerBaseBottomSheetDialog.
Override one or more bottom sheet picker option ui attributes from attr.xml's bottom sheet attributes section. For example,