【发布时间】:2016-03-10 14:50:44
【问题描述】:
如何在 android.support.v4.app.Fragment 中使用偏好片段? 我尝试使用 android.preference.PreferenceFragment 但出现错误:Wrong 2nd argument type/
FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.replace(R.id.fragment_container, new SettingsFragment());
transaction.addToBackStack(null);
transaction.commit();
SettingsFragment 是偏好片段
什么可以解决这个问题?
【问题讨论】:
标签: android android-fragments android-preferences