Как мне найти мой экземпляр PreferenceActivity, который был создан фреймворком?
*
*
*
Мой первый класс.
/** This is MyAppSettings class, The instance of this class will be created by a framework **/
public class MyAppSettings extends PreferenceActivity {
protected MySeekBarPreference mSeekBarPref;
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.prefs);
mSeekBarPref = (MySeekBarPreference)super.findPreference("my_key");
}
}
*
*
*
Мой второй класс.
public class MySeekBarPreference extends DialogPreference implements SeekBar.OnSeekBarChangeListener {
// in whis code I need to get the instance of the MyAppSettings, which was
// created by Android framework. (I paste a hypothetical func getTheInstanceOfMyAppSettings() :))
private MyAppSettings mAppSettings = getTheInstanceOfMyAppSettings();
Могу ли я найти его по идентификатору или как-нибудь еще?