mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
enhance account removal confirmation dialog m3 theming
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
25bbbea282
commit
dd9bdaa886
1 changed files with 7 additions and 3 deletions
|
@ -25,6 +25,7 @@ package com.owncloud.android.ui.dialog;
|
|||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.di.Injectable;
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager;
|
||||
|
@ -76,14 +77,17 @@ public class AccountRemovalConfirmationDialog extends DialogFragment implements
|
|||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
return new AlertDialog.Builder(requireActivity(), R.style.Theme_ownCloud_Dialog)
|
||||
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity())
|
||||
.setTitle(R.string.delete_account)
|
||||
.setMessage(getResources().getString(R.string.delete_account_warning, user.getAccountName()))
|
||||
.setIcon(R.drawable.ic_warning)
|
||||
.setPositiveButton(R.string.common_ok,
|
||||
(dialogInterface, i) -> backgroundJobManager.startAccountRemovalJob(user.getAccountName(),
|
||||
false))
|
||||
.setNeutralButton(R.string.common_cancel, null)
|
||||
.create();
|
||||
.setNeutralButton(R.string.common_cancel, null);
|
||||
|
||||
viewThemeUtils.dialog.colorMaterialAlertDialogBackground(requireActivity(), builder);
|
||||
|
||||
return builder.create();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue