Merge pull request #10608 from t895/theme-refactor
Android: Modernize theming system
This commit is contained in:
commit
31232f8c23
|
@ -49,7 +49,7 @@
|
|||
<activity
|
||||
android:name=".ui.main.MainActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/DolphinBase">
|
||||
android:theme="@style/Theme.Dolphin.Main">
|
||||
|
||||
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
|
||||
<intent-filter>
|
||||
|
@ -62,7 +62,7 @@
|
|||
<activity
|
||||
android:name=".ui.main.TvMainActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/DolphinTvBase">
|
||||
android:theme="@style/Theme.Dolphin.TV">
|
||||
|
||||
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
|
||||
<intent-filter>
|
||||
|
@ -76,26 +76,26 @@
|
|||
android:name=".features.settings.ui.SettingsActivity"
|
||||
android:exported="false"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:theme="@style/DolphinSettingsBase"
|
||||
android:theme="@style/Theme.Dolphin.Settings"
|
||||
android:label="@string/settings"/>
|
||||
|
||||
<activity
|
||||
android:name=".features.cheats.ui.CheatsActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/DolphinSettingsBase"
|
||||
android:theme="@style/Theme.Dolphin.Settings"
|
||||
android:label="@string/cheats"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.EmulationActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/DolphinEmulationBase"
|
||||
android:theme="@style/Theme.Dolphin.Main.Emulation"
|
||||
android:preferMinimalPostProcessing="true"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.CustomFilePickerActivity"
|
||||
android:exported="false"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/FilePickerTheme">
|
||||
android:theme="@style/Theme.Dolphin.FilePicker">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.GET_CONTENT"/>
|
||||
|
@ -119,18 +119,18 @@
|
|||
<activity
|
||||
android:name=".activities.ConvertActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/DolphinBase" />
|
||||
android:theme="@style/Theme.Dolphin.Main" />
|
||||
|
||||
<activity
|
||||
android:name=".activities.UserDataActivity"
|
||||
android:exported="false"
|
||||
android:label="@string/user_data_submenu"
|
||||
android:theme="@style/DolphinSettingsBase" />
|
||||
android:theme="@style/Theme.Dolphin.Settings" />
|
||||
|
||||
<activity
|
||||
android:name=".features.riivolution.ui.RiivolutionBootActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/DolphinBase" />
|
||||
android:theme="@style/Theme.Dolphin.Main" />
|
||||
|
||||
<service
|
||||
android:name=".services.SyncChannelJobService"
|
||||
|
|
|
@ -197,7 +197,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
}
|
||||
else
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setMessage(R.string.unavailable_paths);
|
||||
builder.setPositiveButton(R.string.yes, (dialogInterface, i) ->
|
||||
SettingsActivity.launch(activity, MenuTag.CONFIG_PATHS));
|
||||
|
@ -807,7 +807,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
private void toggleControls()
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.emulation_toggle_controls);
|
||||
if (!NativeLibrary.IsEmulatingWii() || mPreferences.getInt("wiiController", 3) == 0)
|
||||
{
|
||||
|
@ -869,7 +869,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
public void chooseDoubleTapButton()
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
|
||||
int currentController =
|
||||
mPreferences.getInt("wiiController", InputOverlay.OVERLAY_WIIMOTE_NUNCHUK);
|
||||
|
@ -955,7 +955,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
});
|
||||
valueOpacity.setText(seekbarOpacity.getProgress() + "%");
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.emulation_control_adjustments);
|
||||
builder.setView(view);
|
||||
builder.setPositiveButton(R.string.ok, (dialogInterface, i) ->
|
||||
|
@ -977,7 +977,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
private void chooseController()
|
||||
{
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.emulation_choose_controller);
|
||||
builder.setSingleChoiceItems(R.array.controllersEntries,
|
||||
mPreferences.getInt("wiiController", 3),
|
||||
|
@ -999,7 +999,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
private void showMotionControlsOptions()
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.emulation_motion_controls);
|
||||
builder.setSingleChoiceItems(R.array.motionControlsEntries,
|
||||
IntSetting.MAIN_MOTION_CONTROLS.getInt(mSettings),
|
||||
|
@ -1019,7 +1019,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
private void setIRMode()
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.emulation_ir_mode);
|
||||
builder.setSingleChoiceItems(R.array.irModeEntries,
|
||||
IntSetting.MAIN_IR_MODE.getInt(mSettings),
|
||||
|
@ -1129,7 +1129,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
}
|
||||
});
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(getString(R.string.emulation_ir_sensitivity));
|
||||
builder.setView(view);
|
||||
builder.setPositiveButton(R.string.ok, (dialogInterface, i) ->
|
||||
|
@ -1162,7 +1162,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
private void resetOverlay()
|
||||
{
|
||||
new AlertDialog.Builder(this, R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(getString(R.string.emulation_touch_overlay_reset))
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i) ->
|
||||
mEmulationFragment.resetInputOverlay())
|
||||
|
|
|
@ -100,7 +100,7 @@ public class UserDataActivity extends AppCompatActivity
|
|||
{
|
||||
Uri uri = data.getData();
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
|
||||
builder.setMessage(R.string.user_data_import_warning);
|
||||
builder.setNegativeButton(R.string.no, (dialog, i) -> dialog.dismiss());
|
||||
|
@ -148,7 +148,7 @@ public class UserDataActivity extends AppCompatActivity
|
|||
{
|
||||
// Activity not found. Perhaps it was removed by the OEM, or by some new Android version
|
||||
// that didn't exist at the time of writing. Not much we can do other than tell the user
|
||||
new AlertDialog.Builder(this, R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(R.string.user_data_open_system_file_manager_failed)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
|
|
|
@ -47,8 +47,7 @@ public final class AlertMessage extends DialogFragment
|
|||
boolean isWarning = requireArguments().getBoolean(ARG_IS_WARNING);
|
||||
setCancelable(false);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(emulationActivity,
|
||||
R.style.DolphinDialogBase)
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(emulationActivity)
|
||||
.setTitle(title)
|
||||
.setMessage(message);
|
||||
|
||||
|
|
|
@ -38,8 +38,7 @@ public final class GameDetailsDialog extends DialogFragment
|
|||
{
|
||||
GameFile gameFile = GameFileCacheManager.addOrGet(getArguments().getString(ARG_GAME_PATH));
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());
|
||||
ViewGroup contents = (ViewGroup) getActivity().getLayoutInflater()
|
||||
.inflate(R.layout.dialog_game_details, null);
|
||||
|
||||
|
|
|
@ -117,8 +117,7 @@ public class GamePropertiesDialog extends DialogFragment
|
|||
itemsBuilder.add(R.string.properties_clear_game_settings, (dialog, i) ->
|
||||
clearGameSettingsWithConfirmation(gameId));
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireContext(),
|
||||
R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireContext());
|
||||
itemsBuilder.applyToBuilder(builder);
|
||||
builder.setTitle(requireContext()
|
||||
.getString(R.string.preferences_game_properties_with_game_id, gameId));
|
||||
|
@ -127,7 +126,7 @@ public class GamePropertiesDialog extends DialogFragment
|
|||
|
||||
private void clearGameSettingsWithConfirmation(String gameId)
|
||||
{
|
||||
new AlertDialog.Builder(requireContext(), R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(requireContext())
|
||||
.setTitle(R.string.properties_clear_game_settings)
|
||||
.setMessage(R.string.properties_clear_game_settings_confirmation)
|
||||
.setPositiveButton(R.string.yes, (dialog, i) -> clearGameSettings(gameId))
|
||||
|
|
|
@ -89,7 +89,7 @@ public class CheatDetailsFragment extends Fragment
|
|||
private void onDeleteClicked(View view)
|
||||
{
|
||||
AlertDialog.Builder builder =
|
||||
new AlertDialog.Builder(requireContext(), R.style.DolphinDialogBase);
|
||||
new AlertDialog.Builder(requireContext());
|
||||
builder.setMessage(getString(R.string.cheats_delete_confirmation, mCheat.getName()));
|
||||
builder.setPositiveButton(R.string.yes, (dialog, i) -> mViewModel.deleteSelectedCheat());
|
||||
builder.setNegativeButton(R.string.no, null);
|
||||
|
|
|
@ -191,7 +191,7 @@ public class CheatsActivity extends AppCompatActivity
|
|||
|
||||
public void downloadGeckoCodes()
|
||||
{
|
||||
AlertDialog progressDialog = new AlertDialog.Builder(this, R.style.DolphinDialogBase).create();
|
||||
AlertDialog progressDialog = new AlertDialog.Builder(this).create();
|
||||
progressDialog.setTitle(R.string.cheats_downloading);
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
@ -206,14 +206,14 @@ public class CheatsActivity extends AppCompatActivity
|
|||
|
||||
if (codes == null)
|
||||
{
|
||||
new AlertDialog.Builder(this, R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(getString(R.string.cheats_download_failed))
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
}
|
||||
else if (codes.length == 0)
|
||||
{
|
||||
new AlertDialog.Builder(this, R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(getString(R.string.cheats_download_empty))
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
|
@ -223,7 +223,7 @@ public class CheatsActivity extends AppCompatActivity
|
|||
int cheatsAdded = mViewModel.addDownloadedGeckoCodes(codes);
|
||||
String message = getString(R.string.cheats_download_succeeded, codes.length, cheatsAdded);
|
||||
|
||||
new AlertDialog.Builder(this, R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
|
|
|
@ -228,7 +228,7 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
|||
@Override
|
||||
public void showGameIniJunkDeletionQuestion()
|
||||
{
|
||||
new AlertDialog.Builder(this, R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(getString(R.string.game_ini_junk_title))
|
||||
.setMessage(getString(R.string.game_ini_junk_question))
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i) -> mPresenter.clearSettings())
|
||||
|
|
|
@ -195,8 +195,7 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
|
||||
int value = getSelectionForSingleChoiceValue(item);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
|
||||
|
||||
builder.setTitle(item.getName());
|
||||
builder.setSingleChoiceItems(item.getChoicesId(), value, this);
|
||||
|
@ -209,8 +208,7 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
mClickedItem = item;
|
||||
mClickedPosition = position;
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
|
||||
|
||||
builder.setTitle(item.getName());
|
||||
builder.setSingleChoiceItems(item.getChoicesId(), item.getSelectValueIndex(getSettings()),
|
||||
|
@ -227,8 +225,7 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
|
||||
int value = getSelectionForSingleChoiceDynamicDescriptionsValue(item);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
|
||||
|
||||
builder.setTitle(item.getName());
|
||||
builder.setSingleChoiceItems(item.getChoicesId(), value, this);
|
||||
|
@ -242,8 +239,7 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
mClickedPosition = position;
|
||||
mSeekbarMinValue = item.getMin();
|
||||
mSeekbarProgress = item.getSelectedValue(getSettings());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mView.getActivity());
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(mView.getActivity());
|
||||
View view = inflater.inflate(R.layout.dialog_seekbar, null);
|
||||
|
@ -303,7 +299,7 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
|
|||
|
||||
if (!PermissionsHandler.isExternalStorageLegacy())
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
|
||||
builder.setMessage(R.string.path_not_changeable_scoped_storage);
|
||||
builder.setPositiveButton(R.string.ok, (dialog, i) -> dialog.dismiss());
|
||||
builder.show();
|
||||
|
|
|
@ -54,7 +54,7 @@ public final class RunRunnableViewHolder extends SettingViewHolder
|
|||
|
||||
if (alertTextID > 0)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext, R.style.DolphinDialogBase)
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext)
|
||||
.setTitle(mItem.getName())
|
||||
.setMessage(alertTextID);
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public abstract class SettingViewHolder extends RecyclerView.ViewHolder
|
|||
|
||||
Context context = clicked.getContext();
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.DolphinDialogBase)
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context)
|
||||
.setMessage(R.string.setting_clear_confirm);
|
||||
|
||||
builder
|
||||
|
|
|
@ -23,7 +23,7 @@ public class OnlineUpdateRegionSelectDialogFragment extends DialogFragment
|
|||
R.string.japan), getString(R.string.korea), getString(R.string.united_states)};
|
||||
int checkedItem = -1;
|
||||
|
||||
return new AlertDialog.Builder(requireContext(), R.style.DolphinDialogBase)
|
||||
return new AlertDialog.Builder(requireContext())
|
||||
.setTitle(R.string.region_select_title)
|
||||
.setSingleChoiceItems(items, checkedItem, (dialog, which) ->
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ public class SystemMenuNotInstalledDialogFragment extends DialogFragment
|
|||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState)
|
||||
{
|
||||
return new AlertDialog.Builder(requireContext(), R.style.DolphinDialogBase)
|
||||
return new AlertDialog.Builder(requireContext())
|
||||
.setTitle(R.string.system_menu_not_installed_title)
|
||||
.setMessage(R.string.system_menu_not_installed_message)
|
||||
.setPositiveButton(R.string.yes, (dialog, which) ->
|
||||
|
|
|
@ -88,7 +88,7 @@ public class SystemUpdateResultFragment extends DialogFragment
|
|||
throw new IllegalStateException("Unexpected value: " + mResult);
|
||||
}
|
||||
|
||||
return new AlertDialog.Builder(requireContext(), R.style.DolphinDialogBase)
|
||||
return new AlertDialog.Builder(requireContext())
|
||||
.setTitle(title)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(R.string.ok, (dialog, which) ->
|
||||
|
|
|
@ -361,7 +361,7 @@ public class ConvertFragment extends Fragment implements View.OnClickListener
|
|||
return () ->
|
||||
{
|
||||
Context context = requireContext();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setMessage(warning_text)
|
||||
.setPositiveButton(R.string.yes, (dialog, i) -> action.run())
|
||||
.setNegativeButton(R.string.no, null);
|
||||
|
@ -459,7 +459,7 @@ public class ConvertFragment extends Fragment implements View.OnClickListener
|
|||
{
|
||||
progressDialog.dismiss();
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
if (success)
|
||||
{
|
||||
builder.setMessage(R.string.convert_success_message)
|
||||
|
|
|
@ -165,7 +165,7 @@ public final class MainPresenter
|
|||
if (Arrays.stream(childNames).noneMatch((name) -> FileBrowserHelper.GAME_EXTENSIONS.contains(
|
||||
FileBrowserHelper.getExtension(name, false))))
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity, R.style.DolphinDialogBase);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
||||
builder.setMessage(mActivity.getString(R.string.wrong_file_extension_in_directory,
|
||||
FileBrowserHelper.setToSortedDelimitedString(FileBrowserHelper.GAME_EXTENSIONS)));
|
||||
builder.setPositiveButton(R.string.ok, null);
|
||||
|
@ -204,7 +204,7 @@ public final class MainPresenter
|
|||
mActivity.runOnUiThread(() ->
|
||||
{
|
||||
AlertDialog.Builder builder =
|
||||
new AlertDialog.Builder(mActivity, R.style.DolphinDialogBase);
|
||||
new AlertDialog.Builder(mActivity);
|
||||
builder.setMessage(R.string.wii_save_exists);
|
||||
builder.setCancelable(false);
|
||||
builder.setPositiveButton(R.string.yes, (dialog, i) -> canOverwriteFuture.complete(true));
|
||||
|
@ -250,7 +250,7 @@ public final class MainPresenter
|
|||
public void importNANDBin(String path)
|
||||
{
|
||||
AlertDialog.Builder builder =
|
||||
new AlertDialog.Builder(mActivity, R.style.DolphinDialogBase);
|
||||
new AlertDialog.Builder(mActivity);
|
||||
|
||||
builder.setMessage(R.string.nand_import_warning);
|
||||
builder.setNegativeButton(R.string.no, (dialog, i) -> dialog.dismiss());
|
||||
|
|
|
@ -36,7 +36,7 @@ public class Analytics
|
|||
|
||||
private static void showMessage(Context context)
|
||||
{
|
||||
new AlertDialog.Builder(context, R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(context.getString(R.string.analytics))
|
||||
.setMessage(context.getString(R.string.analytics_desc))
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i) ->
|
||||
|
|
|
@ -118,7 +118,7 @@ public final class FileBrowserHelper
|
|||
setToSortedDelimitedString(validExtensions));
|
||||
}
|
||||
|
||||
new AlertDialog.Builder(context, R.style.DolphinDialogBase)
|
||||
new AlertDialog.Builder(context)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i) -> runnable.run())
|
||||
.setNegativeButton(R.string.no, null)
|
||||
|
|
|
@ -27,7 +27,7 @@ public class ThreadUtil
|
|||
@Nullable DialogInterface.OnDismissListener onResultDismiss)
|
||||
{
|
||||
Resources resources = activity.getResources();
|
||||
AlertDialog progressDialog = new AlertDialog.Builder(activity, R.style.DolphinDialogBase)
|
||||
AlertDialog progressDialog = new AlertDialog.Builder(activity)
|
||||
.create();
|
||||
progressDialog.setTitle(progressTitle);
|
||||
if (progressMessage != 0)
|
||||
|
@ -45,7 +45,7 @@ public class ThreadUtil
|
|||
if (result != null)
|
||||
{
|
||||
AlertDialog.Builder builder =
|
||||
new AlertDialog.Builder(activity, R.style.DolphinDialogBase);
|
||||
new AlertDialog.Builder(activity);
|
||||
builder.setMessage(result);
|
||||
builder.setPositiveButton(R.string.ok, (dialog, i) -> dialog.dismiss());
|
||||
builder.setOnDismissListener(onResultDismiss);
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:scrollbarSize="8dp"
|
||||
android:fadeScrollbars="false"
|
||||
android:theme="@style/InGameScrollView">
|
||||
android:fadeScrollbars="false">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_options"
|
||||
|
|
|
@ -1,51 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Inherit from the material theme -->
|
||||
<style name="DolphinBase" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Main theme colors -->
|
||||
<!-- Branding color for the app bar -->
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
|
||||
<!-- Enable window content transitions -->
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
|
||||
<item name="android:colorControlHighlight">?attr/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<!-- Same as above, but use default action bar, and mandate margins. -->
|
||||
<style name="DolphinSettingsBase" parent="Theme.Material3.DayNight">
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
<item name="titleTextColor">@android:color/white</item>
|
||||
<item name="homeAsUpIndicator">@drawable/ic_back</item>
|
||||
</style>
|
||||
|
||||
<!-- Themes for Dialogs -->
|
||||
<style name="DolphinDialogBase" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="DolphinEmulationBase" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
|
||||
<!-- Enable window content transitions -->
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
</style>
|
||||
|
||||
<!-- Hax to make Tablayout render icons -->
|
||||
|
@ -53,26 +12,7 @@
|
|||
<item name="textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<!-- Android TV Themes -->
|
||||
<style name="DolphinTvBase" parent="Theme.Leanback.Browse">
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
|
||||
<!-- Enable window content transitions -->
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
|
||||
<!-- Use CustomTitleView as the leanback title view. -->
|
||||
<item name="browseTitleViewLayout">@layout/titleview</item>
|
||||
</style>
|
||||
|
||||
<style name="InGameScrollView">
|
||||
<item name="android:colorEdgeEffect">@color/dolphin_blue_secondary</item>
|
||||
</style>
|
||||
|
||||
<!-- Custom button styles -->
|
||||
<style name="InGameMenuOption" parent="Widget.Material3.Button.TextButton">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:fontFamily">sans-serif-condensed</item>
|
||||
|
@ -93,29 +33,4 @@
|
|||
<item name="android:gravity">center</item>
|
||||
<item name="android:layout_gravity">center</item>
|
||||
</style>
|
||||
|
||||
<!-- Inherit from a base file picker theme that handles day/night -->
|
||||
<style name="FilePickerTheme" parent="FilePickerBaseTheme">
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
|
||||
<!--<!– Setting a divider is entirely optional –>-->
|
||||
<item name="nnf_list_item_divider">?android:attr/listDivider</item>
|
||||
|
||||
<!-- Need to set this also to style create folder dialog -->
|
||||
<item name="alertDialogTheme">@style/FilePickerAlertDialogTheme</item>
|
||||
|
||||
<!-- If you want to set a specific toolbar theme, do it here -->
|
||||
|
||||
<item name="nnf_toolbarTheme">@style/ThemeOverlay.Material3.Dark.ActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogTheme" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Base theme -->
|
||||
<style name="Theme.Dolphin.Main" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
|
||||
<item name="android:colorControlHighlight">?attr/colorAccent</item>
|
||||
|
||||
<item name="android:colorEdgeEffect">@color/dolphin_blue_secondary</item>
|
||||
|
||||
<!-- Enable window content transitions -->
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
|
||||
<!-- Global alert dialog style -->
|
||||
<item name="alertDialogTheme">@style/DolphinDialogBase</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Dolphin.Settings" parent="Theme.Material3.DayNight">
|
||||
<item name="colorSurface">@color/dolphin_blue</item>
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
|
||||
<item name="titleTextColor">@android:color/white</item>
|
||||
<item name="homeAsUpIndicator">@drawable/ic_back</item>
|
||||
|
||||
<!-- Global alert dialog style -->
|
||||
<item name="alertDialogTheme">@style/DolphinDialogBase</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Dolphin.Main.Emulation" parent="Theme.Dolphin.Main">
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<!-- Inherit from a base file picker theme that handles day/night -->
|
||||
<style name="Theme.Dolphin.FilePicker" parent="FilePickerBaseTheme">
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
<item name="colorPrimaryDark">@color/dolphin_blue</item>
|
||||
<item name="colorAccent">@color/dolphin_blue_secondary</item>
|
||||
|
||||
<!-- Setting a divider is entirely optional -->
|
||||
<item name="nnf_list_item_divider">?android:attr/listDivider</item>
|
||||
|
||||
<!-- If you want to set a specific toolbar theme, do it here -->
|
||||
<item name="nnf_toolbarTheme">@style/ThemeOverlay.Material3.Dark.ActionBar</item>
|
||||
|
||||
<!-- Global alert dialog style -->
|
||||
<item name="alertDialogTheme">@style/DolphinDialogBase</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Dolphin.TV" parent="Theme.Leanback.Browse">
|
||||
<!-- Enable window content transitions -->
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
|
||||
<!-- Use CustomTitleView as the leanback title view. -->
|
||||
<item name="browseTitleViewLayout">@layout/titleview</item>
|
||||
|
||||
<!-- Global alert dialog style -->
|
||||
<item name="alertDialogTheme">@style/DolphinDialogBase</item>
|
||||
</style>
|
||||
</resources>
|
Loading…
Reference in New Issue