Catima: Migrate to MaterialAlertDialogBuilder everywhere

This follows Material theme and looks much better compared to AlertDialog

Ref: https://developer.android.com/reference/com/google/android/material/dialog/MaterialAlertDialogBuilder

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2022-10-05 10:37:03 +05:30
parent 82733ca414
commit aec4292203
7 changed files with 28 additions and 19 deletions

View File

@@ -53,6 +53,7 @@ import androidx.core.widget.TextViewCompat;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.bottomappbar.BottomAppBar;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.io.File;
@@ -464,7 +465,7 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
}
private void showInfoDialog() {
AlertDialog.Builder infoDialog = new AlertDialog.Builder(this);
AlertDialog.Builder infoDialog = new MaterialAlertDialogBuilder(this);
TextView infoTitleView = new TextView(this);
infoTitleView.setPadding(20, 20, 20, 20);
@@ -843,7 +844,7 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
return true;
} else if (id == R.id.action_delete) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
AlertDialog.Builder builder = new MaterialAlertDialogBuilder(this);
builder.setTitle(R.string.deleteTitle);
builder.setMessage(R.string.deleteConfirmation);
builder.setPositiveButton(R.string.confirm, (dialog, which) -> {