use of com.android.settings.utils.CandidateInfoExtra in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SystemNavigationGestureSettings method bindPreferenceExtra.
@Override
public void bindPreferenceExtra(RadioButtonPreference pref, String key, CandidateInfo info, String defaultKey, String systemDefaultKey) {
if (!(info instanceof CandidateInfoExtra) || !(pref instanceof RadioButtonPreferenceWithExtraWidget)) {
return;
}
pref.setSummary(((CandidateInfoExtra) info).loadSummary());
RadioButtonPreferenceWithExtraWidget p = (RadioButtonPreferenceWithExtraWidget) pref;
if (info.getKey() == KEY_SYSTEM_NAV_GESTURAL) {
p.setExtraWidgetVisibility(EXTRA_WIDGET_VISIBILITY_SETTING);
p.setExtraWidgetOnClickListener((v) -> GestureNavigationBackSensitivityDialog.show(this, getBackSensitivity(getContext(), mOverlayManager), getBackHeight(getContext()), getBackBlockIme(getContext()), getHomeHandleSize(getContext()), getShowNav(getContext()), getImeSpace(getContext()), getHomeHandleHeight(getContext())));
} else {
p.setExtraWidgetVisibility(EXTRA_WIDGET_VISIBILITY_GONE);
}
}
use of com.android.settings.utils.CandidateInfoExtra in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SystemNavigationGestureSettings method getCandidates.
@Override
protected List<? extends CandidateInfo> getCandidates() {
final Context c = getContext();
List<CandidateInfoExtra> candidates = new ArrayList<>();
if (SystemNavigationPreferenceController.isOverlayPackageAvailable(c, NAV_BAR_MODE_GESTURAL_OVERLAY)) {
candidates.add(new CandidateInfoExtra(c.getText(R.string.edge_to_edge_navigation_title), c.getText(R.string.edge_to_edge_navigation_summary), KEY_SYSTEM_NAV_GESTURAL, true));
}
if (SystemNavigationPreferenceController.isOverlayPackageAvailable(c, NAV_BAR_MODE_2BUTTON_OVERLAY)) {
candidates.add(new CandidateInfoExtra(c.getText(R.string.swipe_up_to_switch_apps_title), c.getText(R.string.swipe_up_to_switch_apps_summary), KEY_SYSTEM_NAV_2BUTTONS, true));
}
if (SystemNavigationPreferenceController.isOverlayPackageAvailable(c, NAV_BAR_MODE_3BUTTON_OVERLAY)) {
candidates.add(new CandidateInfoExtra(c.getText(R.string.legacy_navigation_title), c.getText(R.string.legacy_navigation_summary), KEY_SYSTEM_NAV_3BUTTONS, true));
}
return candidates;
}
use of com.android.settings.utils.CandidateInfoExtra in project android_packages_apps_Settings by omnirom.
the class SystemNavigationGestureSettings method getCandidates.
@Override
protected List<? extends CandidateInfo> getCandidates() {
final Context c = getContext();
List<CandidateInfoExtra> candidates = new ArrayList<>();
if (SystemNavigationPreferenceController.isOverlayPackageAvailable(c, NAV_BAR_MODE_GESTURAL_OVERLAY)) {
candidates.add(new CandidateInfoExtra(c.getText(R.string.edge_to_edge_navigation_title), c.getText(R.string.edge_to_edge_navigation_summary), KEY_SYSTEM_NAV_GESTURAL, true));
}
if (SystemNavigationPreferenceController.isOverlayPackageAvailable(c, NAV_BAR_MODE_2BUTTON_OVERLAY)) {
candidates.add(new CandidateInfoExtra(c.getText(R.string.swipe_up_to_switch_apps_title), c.getText(R.string.swipe_up_to_switch_apps_summary), KEY_SYSTEM_NAV_2BUTTONS, true));
}
if (SystemNavigationPreferenceController.isOverlayPackageAvailable(c, NAV_BAR_MODE_3BUTTON_OVERLAY)) {
candidates.add(new CandidateInfoExtra(c.getText(R.string.legacy_navigation_title), c.getText(R.string.legacy_navigation_summary), KEY_SYSTEM_NAV_3BUTTONS, true));
}
return candidates;
}
Aggregations