mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
extract dialog creation to separate method
This commit is contained in:
parent
9b1520c0f2
commit
ed7d918c26
1 changed files with 5 additions and 3 deletions
|
@ -61,7 +61,6 @@ import java.util.Locale;
|
|||
/*
|
||||
* Dialog to setup encryption
|
||||
*/
|
||||
|
||||
public class SetupEncryptionDialogFragment extends DialogFragment {
|
||||
|
||||
public static final String SUCCESS = "SUCCESS";
|
||||
|
@ -143,7 +142,11 @@ public class SetupEncryptionDialogFragment extends DialogFragment {
|
|||
DrawableCompat.setTint(wrappedDrawable, accentColor);
|
||||
passwordField.setBackgroundDrawable(wrappedDrawable);
|
||||
|
||||
// Build the dialog
|
||||
return createDialog(accentColor, v);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private Dialog createDialog(int accentColor, View v) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setView(v).setPositiveButton(R.string.common_ok, null)
|
||||
.setNegativeButton(R.string.common_cancel, null)
|
||||
|
@ -224,7 +227,6 @@ public class SetupEncryptionDialogFragment extends DialogFragment {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue