Android: Use the newly added style for all dialogs
For consistency, and in case I missed any cases where not specifing a theme could lead to a crash on Android TV.
This commit is contained in:
parent
ff0c36b21a
commit
163b176bab
|
@ -463,7 +463,8 @@ public final class NativeLibrary
|
|||
{
|
||||
// Create object used for waiting.
|
||||
final Object lock = new Object();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(emulationActivity)
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(emulationActivity,
|
||||
R.style.DolphinDialogBase)
|
||||
.setTitle(caption)
|
||||
.setMessage(text);
|
||||
|
||||
|
|
|
@ -738,7 +738,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
{
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
boolean[] enabledButtons = new boolean[14];
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
builder.setTitle(R.string.emulation_toggle_controls);
|
||||
if (sIsGameCubeGame || mPreferences.getInt("wiiController", 3) == 0)
|
||||
{
|
||||
|
@ -795,7 +795,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
public void chooseDoubleTapButton()
|
||||
{
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
|
||||
int currentController =
|
||||
mPreferences.getInt("wiiController", InputOverlay.OVERLAY_WIIMOTE_NUNCHUCK);
|
||||
|
@ -857,7 +857,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
value.setText(String.valueOf(seekbar.getProgress() + 50));
|
||||
units.setText("%");
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
builder.setTitle(R.string.emulation_control_scale);
|
||||
builder.setView(view);
|
||||
builder.setPositiveButton(getString(R.string.ok), (dialogInterface, i) ->
|
||||
|
@ -876,7 +876,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
private void chooseController()
|
||||
{
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
builder.setTitle(R.string.emulation_choose_controller);
|
||||
builder.setSingleChoiceItems(R.array.controllersEntries,
|
||||
mPreferences.getInt("wiiController", 3),
|
||||
|
@ -902,7 +902,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
private void showMotionControlsOptions()
|
||||
{
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
builder.setTitle(R.string.emulation_motion_controls);
|
||||
builder.setSingleChoiceItems(R.array.motionControlsEntries,
|
||||
mPreferences.getInt("motionControlsEnabled", 0),
|
||||
|
@ -938,7 +938,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
}
|
||||
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
builder.setTitle(R.string.emulation_screen_orientation);
|
||||
builder.setSingleChoiceItems(R.array.orientationEntries, initialIndex,
|
||||
(dialog, indexSelected) ->
|
||||
|
@ -1055,7 +1055,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
}
|
||||
});
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
builder.setTitle(getString(R.string.emulation_ir_sensitivity));
|
||||
builder.setView(view);
|
||||
builder.setPositiveButton(R.string.ok, (dialogInterface, i) ->
|
||||
|
@ -1090,7 +1090,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
private void resetOverlay()
|
||||
{
|
||||
new AlertDialog.Builder(this)
|
||||
new AlertDialog.Builder(this, R.style.DolphinDialogBase)
|
||||
.setTitle(getString(R.string.emulation_touch_overlay_reset))
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i) ->
|
||||
{
|
||||
|
|
|
@ -137,7 +137,7 @@ public final class GameAdapter extends RecyclerView.Adapter<GameViewHolder> impl
|
|||
|
||||
if (gameId.isEmpty())
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity, R.style.DolphinDialogBase);
|
||||
builder.setTitle("Game Settings");
|
||||
builder.setMessage("Files without game IDs don't support game-specific settings.");
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
|||
@Override
|
||||
public void showGameIniJunkDeletionQuestion()
|
||||
{
|
||||
new AlertDialog.Builder(this)
|
||||
new AlertDialog.Builder(this, R.style.DolphinDialogBase)
|
||||
.setTitle(getString(R.string.game_ini_junk_title))
|
||||
.setMessage(getString(R.string.game_ini_junk_question))
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i) -> mPresenter.clearSettings())
|
||||
|
|
|
@ -192,7 +192,8 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
|
||||
int value = getSelectionForSingleChoiceValue(item);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
|
||||
builder.setTitle(item.getNameId());
|
||||
builder.setSingleChoiceItems(item.getChoicesId(), value, this);
|
||||
|
@ -205,7 +206,8 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
mClickedItem = item;
|
||||
mClickedPosition = position;
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
|
||||
builder.setTitle(item.getNameId());
|
||||
builder.setSingleChoiceItems(item.getChoicesId(), item.getSelectValueIndex(), this);
|
||||
|
@ -221,7 +223,8 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
|
||||
int value = getSelectionForSingleChoiceDynamicDescriptionsValue(item);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
|
||||
builder.setTitle(item.getNameId());
|
||||
builder.setSingleChoiceItems(item.getChoicesId(), value, this);
|
||||
|
@ -234,7 +237,8 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
mClickedItem = item;
|
||||
mClickedPosition = position;
|
||||
mSeekbarProgress = item.getSelectedValue();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(mView.getActivity());
|
||||
View view = inflater.inflate(R.layout.dialog_seekbar, null);
|
||||
|
|
|
@ -58,7 +58,7 @@ public final class ConfirmRunnableViewHolder extends SettingViewHolder
|
|||
String alertTitle = mContext.getString(mItem.getNameId());
|
||||
String alertText = mContext.getString(mItem.getAlertText());
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext)
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext, R.style.DolphinDialogBase)
|
||||
.setTitle(alertTitle)
|
||||
.setMessage(alertText);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class PermissionsHandler
|
|||
private static void showMessageOKCancel(final FragmentActivity activity, String message,
|
||||
DialogInterface.OnClickListener okListener)
|
||||
{
|
||||
new AlertDialog.Builder(activity)
|
||||
new AlertDialog.Builder(activity, R.style.DolphinDialogBase)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(android.R.string.ok, okListener)
|
||||
.setNegativeButton(android.R.string.cancel, (dialogInterface, i) ->
|
||||
|
|
Loading…
Reference in New Issue