Merge "Update button strings for new design" into main
This commit is contained in:
@@ -114,6 +114,18 @@ public class DefaultCombinedPicker extends DefaultAppPickerFragment {
|
||||
setCancelListener(target.mCancelListener);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CharSequence getPositiveButtonText() {
|
||||
final Bundle bundle = getArguments();
|
||||
if (TextUtils.isEmpty(bundle.getString(EXTRA_KEY))) {
|
||||
return getContext().getString(
|
||||
R.string.credman_confirmation_turn_off_positive_button);
|
||||
}
|
||||
|
||||
return getContext().getString(
|
||||
R.string.credman_confirmation_change_provider_positive_button);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -138,11 +138,15 @@ public abstract class DefaultAppPickerFragment extends RadioButtonPickerFragment
|
||||
final Bundle bundle = getArguments();
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())
|
||||
.setMessage(bundle.getCharSequence(EXTRA_MESSAGE))
|
||||
.setPositiveButton(android.R.string.ok, this)
|
||||
.setPositiveButton(getPositiveButtonText(), this)
|
||||
.setNegativeButton(android.R.string.cancel, mCancelListener);
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
protected CharSequence getPositiveButtonText() {
|
||||
return getContext().getString(android.R.string.ok);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
final Fragment fragment = getTargetFragment();
|
||||
|
Reference in New Issue
Block a user