補(bǔ)充一下安卓官方的建議:
If you're developing for Android 3.0 (API level 11) and higher, you should use a PreferenceFragment to display your list of Preference objects. You can add a PreferenceFragment to any activity—you don't need to use PreferenceActivity.
https://developer.android.com/guide/topics/ui/settings.html#Fragment
Android學(xué)習(xí)筆記1 PreferenceActivity和PreferenceFragment實(shí)現(xiàn)設(shè)置界面前言 我們?cè)谶M(jìn)行Android開發(fā)的過(guò)程中,有時(shí)需要實(shí)現(xiàn)一個(gè)設(shè)置界面,就像下面的系統(tǒng)的顯示設(shè)置。這樣的界面自己實(shí)現(xiàn)起來(lái)略顯繁瑣,好在Android中已經(jīng)實(shí)現(xiàn)了這樣的設(shè)置界面,...