Created
March 6, 2022 18:30
-
-
Save aqua30/cc8b8e850cf3b7f960fd135ee72d3d4e to your computer and use it in GitHub Desktop.
Bottom sheet dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.aqua30.testingproject.curved_background | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import android.view.WindowManager | |
import androidx.appcompat.app.AppCompatActivity | |
import com.aqua30.testingproject.R | |
import com.aqua30.testingproject.databinding.BottomCurvedBinding | |
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
/** | |
* Created by Saurabh | |
*/ | |
class BottomSheetContainer: BottomSheetDialogFragment() { | |
lateinit var binding : BottomCurvedBinding | |
override fun onCreateView( | |
inflater: LayoutInflater, | |
container: ViewGroup?, | |
savedInstanceState: Bundle? | |
): View? { | |
binding = BottomCurvedBinding.inflate(layoutInflater,container,false) | |
return binding.root | |
} | |
companion object { | |
fun show (activity: AppCompatActivity): BottomSheetContainer { | |
val fragment = BottomSheetContainer() | |
fragment.show(activity.supportFragmentManager,"") | |
return fragment | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment