I made an Android alert dialog I hope the background will be treated as a blur. It works normally on the api 32 device, but it doesn't work on the api 34 device What is the problem?
<style name="RoundedDialog" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:background">@drawable/rounded_background_main_color</item>
</style>
---@drawable/rounded_background_main_color---
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:topLeftRadius="20dp"
android:topRightRadius="20dp"
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"/>
<solid android:color="@color/main_color" />
val builder = AlertDialog.Builder(thisContext, R.style.RoundedDialog)
builder.setTitle("삭제 확인")
.setMessage("정말 " + item.model.title + "을/를 삭제하시겠습니까?")
.setPositiveButton("확인",
DialogInterface.OnClickListener { dialog, id ->
viewModelScope.launch(Dispatchers.IO) {
db.myDao().delete(item)
}
deleteItem(item.id)
val list = _mutableRecipeListModel.value!!
list.removeAt(position)
_mutableRecipeListModel.value = list
})
.setNegativeButton("취소",
DialogInterface.OnClickListener { dialog, id ->
})
builder.show()