在首选项屏幕中,我想使用MaterialComponent的对话框(使用MaterialAlertDialogBuilder
)而不是AppCompat中的AlertDialog
。但是,AppCompat的首选项框架使用AlertDialog.Builder
进行硬编码。
据我所知,覆盖此内容的唯一方法是覆盖:PreferenceFragmentCompat.onDisplayPreferenceDialog()
并从该超类复制一堆逻辑(就显示对话框片段等而言。)>
这是正确的方法还是有更好的方法?
在首选项屏幕中,我想使用MaterialComponent的对话框(使用MaterialAlertDialogBuilder)代替AppCompat的AlertDialog。但是,AppCompat的首选项框架使用...