diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-04-12 21:18:55 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-04-12 21:18:55 +0300 |
commit | 6848325f2615030512cc218edc69882ae29d2be6 (patch) | |
tree | f8037f80d9c60277fba65f9779093c4f89dd5347 /app/src/main/java/it/niedermann/nextcloud/deck/ui/stack | |
parent | bed0467f47617ab83968b5174029d81c7d5322b6 (diff) |
#317 Adjust theme for each account
Dialogs & DeleteDialogs
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/stack')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/DeleteStackDialogFragment.java | 6 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/EditStackDialogFragment.java | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/DeleteStackDialogFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/DeleteStackDialogFragment.java index da1070b4a..e0a741b00 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/DeleteStackDialogFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/DeleteStackDialogFragment.java @@ -9,9 +9,9 @@ import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.DialogFragment; import it.niedermann.nextcloud.deck.R; -import it.niedermann.nextcloud.deck.ui.view.DeleteDialogFragment; +import it.niedermann.nextcloud.deck.ui.branding.BrandedDeleteAlertDialogBuilder; -public class DeleteStackDialogFragment extends DeleteDialogFragment { +public class DeleteStackDialogFragment extends DialogFragment { private static final String KEY_STACK_ID = "stack_id"; @@ -44,7 +44,7 @@ public class DeleteStackDialogFragment extends DeleteDialogFragment { @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { - AlertDialog.Builder builder = new AlertDialog.Builder(requireContext()) + AlertDialog.Builder builder = new BrandedDeleteAlertDialogBuilder(requireContext()) .setTitle(R.string.delete_list) .setMessage(R.string.do_you_want_to_delete_the_current_list) .setPositiveButton(R.string.simple_delete, (dialog, whichButton) -> deleteStackListener.onStackDeleted(stackId)) diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/EditStackDialogFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/EditStackDialogFragment.java index 6e7cc817e..f71d66c92 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/EditStackDialogFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/EditStackDialogFragment.java @@ -17,6 +17,7 @@ import java.util.Objects; import it.niedermann.nextcloud.deck.R; import it.niedermann.nextcloud.deck.databinding.DialogStackCreateBinding; import it.niedermann.nextcloud.deck.ui.branding.BrandedActivity; +import it.niedermann.nextcloud.deck.ui.branding.BrandedAlertDialogBuilder; import it.niedermann.nextcloud.deck.ui.branding.BrandedDialogFragment; import static it.niedermann.nextcloud.deck.Application.NO_STACK_ID; @@ -50,11 +51,9 @@ public class EditStackDialogFragment extends BrandedDialogFragment { public Dialog onCreateDialog(Bundle savedInstanceState) { binding = DialogStackCreateBinding.inflate(requireActivity().getLayoutInflater()); - AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity()) + AlertDialog.Builder builder = new BrandedAlertDialogBuilder(requireActivity()) .setView(binding.getRoot()) - .setNegativeButton(android.R.string.cancel, (dialog, which) -> { - // Do something else - }); + .setNegativeButton(android.R.string.cancel, null); if (getArguments() == null) { throw new IllegalArgumentException("Please add at least stack id to the arguments"); } @@ -95,7 +94,6 @@ public class EditStackDialogFragment extends BrandedDialogFragment { @Override public void applyBrand(int mainColor, int textColor) { - super.applyBrand(mainColor, textColor); BrandedActivity.applyBrandToEditText(mainColor, textColor, binding.input); } } |