Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2020-07-02 09:28:50 +0300
committerStefan Niedermann <info@niedermann.it>2020-07-02 09:28:50 +0300
commitea9cd52090cfb601b21c098df133f7c46bc9e393 (patch)
tree727a8f195f3024fcf9f770761ba58a82bfafaa9a /app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java
parent24e85f2d2da4421fe771072588bf5874f1ee8980 (diff)
#525 Adjust design to new style of Nextcloud app
- Fix branding for snackbar & ExceptionDialogFragment - Add hint action for battery optimization
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java
index 937373932..20e6f8dc8 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java
@@ -6,10 +6,12 @@ import android.view.View;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
+import androidx.core.content.ContextCompat;
import com.google.android.material.snackbar.BaseTransientBottomBar;
import com.google.android.material.snackbar.Snackbar;
+import it.niedermann.nextcloud.deck.R;
import it.niedermann.nextcloud.deck.util.ColorUtil;
import static it.niedermann.nextcloud.deck.ui.branding.BrandingUtil.isBrandingEnabled;
@@ -24,6 +26,8 @@ public class BrandedSnackbar {
if (isBrandingEnabled(view.getContext())) {
@ColorInt final int color = readBrandMainColor(view.getContext());
snackbar.setActionTextColor(ColorUtil.isColorDark(color) ? Color.WHITE : color);
+ } else {
+ snackbar.setActionTextColor(ContextCompat.getColor(view.getContext(), R.color.primary));
}
return snackbar;
}