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:
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandingUtil.java')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandingUtil.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandingUtil.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandingUtil.java
index 768ba13e0..b20e437f8 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandingUtil.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandingUtil.java
@@ -16,6 +16,7 @@ import androidx.preference.PreferenceManager;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.tabs.TabLayout;
+import com.google.android.material.textfield.TextInputLayout;
import it.niedermann.android.util.ColorUtil;
import it.niedermann.nextcloud.deck.DeckLog;
@@ -99,6 +100,11 @@ public abstract class BrandingUtil {
));
}
+ public static void applyBrandToEditTextInputLayout(@ColorInt int color, @NonNull TextInputLayout til) {
+ til.setBoxStrokeColor(contrastRatioIsSufficientBigAreas(color, ContextCompat.getColor(til.getContext(), R.color.primary)) ? color : ContextCompat.getColor(til.getContext(), R.color.accent));
+ til.setHintTextColor(ColorStateList.valueOf(contrastRatioIsSufficient(color, ContextCompat.getColor(til.getContext(), R.color.primary)) ? color : ContextCompat.getColor(til.getContext(), R.color.accent)));
+ }
+
public static void tintMenuIcon(@NonNull MenuItem menuItem, @ColorInt int color) {
Drawable drawable = menuItem.getIcon();
if (drawable != null) {