We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please include:
dialog_notification_filter.xml
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingHorizontal="@dimen/sixteen_sdp" android:paddingBottom="@dimen/_80sdp">
<eightbitlab.com.blurview.BlurView android:id="@+id/blurView" android:layout_width="match_parent" android:layout_height="wrap_content" app:blurOverlayColor="#4D111111" android:background="@drawable/bg_n_filter" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toTopOf="parent"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/rvBottom" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" tools:listitem="@layout/layout_notification_filter" /> </LinearLayout> </eightbitlab.com.blurview.BlurView>
</androidx.constraintlayout.widget.ConstraintLayout>
Kotlin code :
lateinit var dialogNotificationFilterBinding: DialogNotificationFilterBinding lateinit var bottomSheetDialog: BottomSheetDialog private fun createNotificationFilterDialog() { bottomSheetDialog = BottomSheetDialog(requireContext(), R.style.BottomSheetDialogTransStyle) dialogNotificationFilterBinding = DialogNotificationFilterBinding.inflate(LayoutInflater.from(activity)) bottomSheetDialog.setContentView(dialogNotificationFilterBinding.root) bottomSheetDialog.window!!.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) bottomSheetDialog.setCanceledOnTouchOutside(true) bottomSheetDialog.setCancelable(true) addDataInFilterList() val mBottomAdapter = NotificationFilterAdapter( viewModel.filterList, requireContext(), fType ) { position, view -> if (fType == 1) { binding.tvFilTime.text = viewModel.filterList[position]?.text ?: "" } if (fType == 2) { binding.tvFilType.text = viewModel.filterList[position]?.text ?: "" } if (fType == 3) { binding.tvFilStatus.text = viewModel.filterList[position]?.text ?: "" } bottomSheetDialog.dismiss() } dialogNotificationFilterBinding.rvBottom.apply { this.adapter = mBottomAdapter this.layoutManager = LinearLayoutManager(requireContext()) val itemDecoration = DividerItemDecoration(this.context, DividerItemDecoration.VERTICAL) itemDecoration.setDrawable( ContextCompat.getDrawable( requireContext(), R.drawable.bg_divider )!! ) addItemDecoration(itemDecoration) } try { bottomSheetDialog.show() } catch (ignored: Exception) { } val radius = 12f if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { dialogNotificationFilterBinding.blurView.setupWith( dialogNotificationFilterBinding.main, RenderEffectBlur() ).setBlurRadius(radius) .setBlurAutoUpdate(true) } }
style
<style name="bottomSheetTransperentBackground" parent="Widget.Design.BottomSheet.Modal"> <item name="android:background">@color/transparent</item> </style>
Let me know if you need more details
The text was updated successfully, but these errors were encountered:
Duplicate of #216
Sorry, something went wrong.
No branches or pull requests
Please include:
dialog_notification_filter.xml
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/sixteen_sdp"
android:paddingBottom="@dimen/_80sdp">
</androidx.constraintlayout.widget.ConstraintLayout>
Kotlin code :
style
<style name="BottomSheetDialogTransStyle" parent="Theme.Design.Light.BottomSheetDialog"> @style/bottomSheetTransperentBackground </style>Let me know if you need more details
The text was updated successfully, but these errors were encountered: