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-06-30 11:42:12 +0300
committerNiedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com>2020-06-30 13:58:19 +0300
commit5c0cdfe5e331e1270a12a75d1fd39155481dc798 (patch)
tree9e77a7478d7dd96b5ab4abd2d4cc9c06edd95a40 /app/src/main/java/it/niedermann/nextcloud/deck/ui/about
parente909e029eb17f1b8b60cd2dcd3163f6876d1fbf4 (diff)
#525 Adjust design to new style of Nextcloud app
FAB branding
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/about')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java
index eab8ad01a..4de75ce3a 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java
@@ -1,17 +1,22 @@
package it.niedermann.nextcloud.deck.ui.about;
import android.content.Intent;
+import android.content.res.ColorStateList;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
+import androidx.core.graphics.drawable.DrawableCompat;
import it.niedermann.nextcloud.deck.R;
import it.niedermann.nextcloud.deck.databinding.FragmentAboutLicenseTabBinding;
import it.niedermann.nextcloud.deck.ui.branding.BrandedFragment;
+import it.niedermann.nextcloud.deck.ui.branding.BrandingUtil;
+import it.niedermann.nextcloud.deck.util.ColorUtil;
import static it.niedermann.nextcloud.deck.util.SpannableUtil.setTextWithURL;
@@ -30,7 +35,8 @@ public class AboutFragmentLicenseTab extends BrandedFragment {
@Override
public void applyBrand(int mainColor) {
- binding.aboutAppLicenseButton.setBackgroundColor(mainColor);
- binding.aboutAppLicenseButton.setTextColor(mainColor);
+ @ColorInt final int finalMainColor = BrandingUtil.getSecondaryForegroundColorDependingOnTheme(requireContext(), mainColor);
+ DrawableCompat.setTintList(binding.aboutAppLicenseButton.getBackground(), ColorStateList.valueOf(finalMainColor));
+ binding.aboutAppLicenseButton.setTextColor(ColorUtil.getForegroundColorForBackgroundColor(finalMainColor));
}
} \ No newline at end of file