how to make the nested Android PreferenceScreen show in Full Screen(without titlebar in system)

北慕城南 提交于 2019-12-08 02:59:48

问题


I have write an PreferenceActivity and it contains nested child PreferenceScreen. the problem is i want made them FullScreen, i've add theme.fullscreen in AndroidManifest and it works, but when i click on one of the sub-item to enter an nested PreferenceScreen, the title bar appears. and now i didn't know how to make the nested full screen too. and i've look source code for PreferenceScreen to find help. it shows that nested preferenceScreen was showed on an Dialog, and i found the code which new the Dialog in method showDialog.

Dialog dialog = mDialog = new Dialog(context, TextUtils.isEmpty(title)
            ? com.android.internal.R.style.Theme_NoTitleBar
            : com.android.internal.R.style.Theme);

it seems that noway to do that, but i really want to know is anyone can implement this in one PreferenceActivity.


回答1:


This is a bug in android see the Bug Report.

There is a workaround here by using addPreferenceFromIntent().



来源:https://stackoverflow.com/questions/6995154/how-to-make-the-nested-android-preferencescreen-show-in-full-screenwithout-titl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!