Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8c3e7e8 authored by Georg Veichtlbauer's avatar Georg Veichtlbauer
Browse files

ExactCalculator: Convert to Material alert dialogs

Change-Id: I3eeca0668f5ccef8586f05d5d3c2cdc0d0230b79
parent a8490a0f
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -25,11 +25,12 @@ import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;

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

/**
 * Display a message with a dismiss putton, and optionally a second button.
 */
@@ -102,14 +103,10 @@ public class AlertDialogFragment extends DialogFragment implements DialogInterfa
        dialogFragment.show(manager, tag /* tag */);
    }

    public AlertDialogFragment() {
        setStyle(STYLE_NO_TITLE, android.R.attr.alertDialogTheme);
    }

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        final Bundle args = getArguments() == null ? Bundle.EMPTY : getArguments();
        final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(getActivity());

        final LayoutInflater inflater = LayoutInflater.from(builder.getContext());
        final TextView messageView = (TextView) inflater.inflate(