我正在使用PreferenceActivity,我需要使用方法getSupportFragmentManager()
来显示一个对话框。我有这样在PreferenceActivity中使用getSupportFragmentManager
myClassDialog dia = new myClassDialog();
dia.show(getSupportFragmentManager(), null);
的Eclipse代码给了我这个错误:
The method
getSupportFragmentManager()
is undefined for the type newPreference.OnPreferenceClickListener(){}
我怎样才能解决这个问题?
[Call Dialog:Not working on API 10](http://stackoverflow.com/questions/20523119/call-dialog-not-work-on-api-10) – Nfear
另请参阅:http:/ /stackoverflow.com/questions/7922906/is-it-possible-to-launch-a-dialogfragment-from-a-preference-in-a-preferenceactiv –
你刚才问了这个34分钟前(http://stackoverflow.com的/ questions/20523119/call-dialog-not-work-on-api-10)问题并得到答案。为什么不花一些时间尝试自己找到解决方案并学习? – Emmanuel