public void onGuidedActionClicked(GuidedAction action) { long id = action.getId(); long modId = (id - 1) / 4; int subId = (int) ((id - 1) % 4);
@Override public void onGuidedActionClicked(GuidedAction action) { if (action.getId() == ACTION_ID_IN_STORE) { FireTVUtils.openAppInAmazonStore(getActivity(), pkg); } else if (action.getId() == ACTION_ID_SETTINGS) { FireTVUtils.startAppSettings(getActivity(), pkg); SharedPreferencesUtil util = SharedPreferencesUtil.instance(context); if (action.getId() == ACTION_ID_FAVORITE) { boolean favorited = !util.isFavorite(pkg); action.setChecked(favorited); util.unfavorite(pkg); } else if (action.getId() == ACTION_ID_HIDE) { boolean hidden = !util.isHidden(pkg); action.setChecked(hidden);
private void addCheckedAction(List<GuidedAction> actions, int iconResId, Context context, String title, String desc, boolean checked) { GuidedAction guidedAction = new GuidedAction.Builder(context) .title(title) .description(desc) .checkSetId(OPTION_CHECK_SET_ID) .icon(iconResId) .build(); guidedAction.setChecked(checked); actions.add(guidedAction); }
private void addCheckedAction(List<GuidedAction> actions, int iconResId, Context context, String title, String desc, boolean checked) { GuidedAction guidedAction = new GuidedAction.Builder(context) .title(title) .description(desc) .checkSetId(OPTION_CHECK_SET_ID) .icon(iconResId) .build(); guidedAction.setChecked(checked); actions.add(guidedAction); }
@Override public void onGuidedActionClicked(GuidedAction action) { switch ((int) action.getId()) { case ACTION_CONTINUE: tearDownAccount(); break; case ACTION_BACK: getActivity().finish(); break; default: Log.w(getClass().getSimpleName(), getString(R.string.pref_action_not_defined)); break; } }
private void addCheckedAction(List<GuidedAction> actions, int iconResId, Context context, String title, String desc, boolean checked) { GuidedAction guidedAction = new GuidedAction.Builder(context) .title(title) .description(desc) .checkSetId(OPTION_CHECK_SET_ID) .icon(iconResId) .build(); guidedAction.setChecked(checked); actions.add(guidedAction); }
@Override public void onGuidedActionClicked(GuidedAction action) { if (action.getId() == YES) { getContract().onSelection(true); } else { getContract().onSelection(false); } } }
public void onGuidedActionClicked(GuidedAction action) { switch ((int) action.getId()) { case 1: AppsManager.saveSortingMode(getActivity(), SortingMode.RECENCY); return; case 2: AppsManager.saveSortingMode(getActivity(), SortingMode.FIXED); return; default: return; } } }
public void onGuidedActionClicked(GuidedAction action) { Intent startMain; switch ((int) action.getId()) { case 1: GuidedStepSupportFragment.add(getFragmentManager(), new LegacyAppOrderPreferenceFragment()); return; case 2: GuidedStepSupportFragment.add(getFragmentManager(), new LegacyAppRowPreferenceFragment()); return; default: return; } } }
public void onGuidedActionClicked(GuidedAction action) { switch ((int) action.getId()) { case 1: GuidedStepSupportFragment.add(getFragmentManager(), new LegacyRecommendationsPreferenceFragment()); return; case 2: GuidedStepSupportFragment.add(getFragmentManager(), new LegacyAppsAndGamesPreferenceFragment()); return; case 3: GuidedStepSupportFragment.add(getFragmentManager(), new LegacyHiddenPreferenceFragment()); return; default: return; } } }