@Override // Hit when an item in the first-level popup gets selected, then bring up // the second-level popup public void onPreferenceClicked(ListPreference pref) { if (mSecondPopup != null) return; LayoutInflater inflater = (LayoutInflater) mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); ListPrefSettingPopup basic = (ListPrefSettingPopup) inflater.inflate(R.layout.list_pref_setting_popup, null, false); basic.initialize(pref); basic.setSettingChangedListener(this); mModule.dismissPopup(true); mSecondPopup = basic; mModule.showPopup(mSecondPopup); }
public void popupDismissed(boolean topPopupOnly) { // if the 2nd level popup gets dismissed if (mSecondPopup != null) { mSecondPopup = null; if (topPopupOnly) mModule.showPopup(mPopup); } initializePopup(); }
@Override // Hit when an item in the second-level popup gets selected public void onListPrefChanged(ListPreference pref) { if (mPopup != null && mSecondPopup != null) { mModule.dismissPopup(true); mPopup.reloadPreference(); } onSettingChanged(pref); }