Skip to content

hoanganhtuan95ptit/Android-HackBottomSheet

Repository files navigation

Android-HackBottomSheet

Download

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}
    
    
dependencies {
    implementation 'com.github.hoanganhtuan95ptit:Android-HackBottomSheet:$new_version'
}

Use

You just need to change BottomSheet's dialog to CustomBottomSheetDialog. The rest CustomBottomSheetDialog will take care of itself
open class BaseBottomSheetDialogFragment(contentLayoutId: Int) : BottomSheetDialogFragment(contentLayoutId) {

    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
        return CustomBottomSheetDialog(requireContext(), theme)
    }
}

This library may not really be optimal, but I look forward to receiving public contributions to improve the library.