Skip to content

Commit

Permalink
fix: use MaterialAlertDialogBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtr126 committed Feb 21, 2024
1 parent 51932dd commit 37e2b3f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/main/java/xtr/keymapper/editor/EditorUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static xtr.keymapper.keymap.KeymapProfiles.MOUSE_RIGHT;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
Expand All @@ -14,6 +13,10 @@
import android.view.ViewGroup;
import android.view.WindowManager;

import androidx.appcompat.app.AlertDialog;

import com.google.android.material.dialog.MaterialAlertDialogBuilder;

import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -194,7 +197,7 @@ else if (id == R.id.save) {
}
else if (id == R.id.dpad) {
final CharSequence[] items = { "Arrow Keys", "WASD Keys"};
AlertDialog.Builder builder = new AlertDialog.Builder(context);
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context);
builder.setTitle("Select Dpad").setItems(items, (dialog, i) -> {
if (i == 0) addArrowKeysDpad(defaultX, defaultY);
else addWasdDpad(defaultX, defaultY);
Expand Down

0 comments on commit 37e2b3f

Please sign in to comment.