Android TV: Fix crash when long pressing a game
Also fixes the same crash when accessing the game details (which only can be accessed after long pressing a game). The problem was that we were not using a theme that had an AppCompat theme as a parent. Unfortunately, the game details dialog uses white on white on Android TV, and I don't know how to fix this in a clean way.
This commit is contained in:
parent
4ff855921e
commit
4fd42d994e
|
@ -82,7 +82,7 @@ public final class GameRowPresenter extends Presenter
|
|||
|
||||
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.");
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ public final class GameDetailsDialog extends DialogFragment
|
|||
{
|
||||
GameFile gameFile = GameFileCacheService.addOrGet(getArguments().getString(ARG_GAME_PATH));
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity(),
|
||||
R.style.DolphinDialogBase);
|
||||
ViewGroup contents = (ViewGroup) getActivity().getLayoutInflater()
|
||||
.inflate(R.layout.dialog_game_details, null);
|
||||
|
||||
|
|
|
@ -45,7 +45,8 @@ public class GamePropertiesDialog extends DialogFragment
|
|||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireContext());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireContext(),
|
||||
R.style.DolphinDialogBase);
|
||||
|
||||
String path = requireArguments().getString(ARG_PATH);
|
||||
String gameId = requireArguments().getString(ARG_GAMEID);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<!-- Themes for Dialogs -->
|
||||
|
||||
<!-- Inherit from the Base Dolphin Dialog Theme -->
|
||||
<style name="DolphinDialogBase" parent="Theme.AppCompat.DayNight.Dialog.Alert" />
|
||||
|
||||
<style name="DolphinEmulationBase" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||
|
|
Loading…
Reference in New Issue