From 972921a05ce6f28f8f03e1a4e572c94758a4a33d Mon Sep 17 00:00:00 2001 From: gdlbo <41114720+gdlbo@users.noreply.github.com> Date: Sun, 4 Dec 2022 23:31:38 +0300 Subject: [PATCH] OverlayTextView hooked --- .../ru/vtosters/lite/themes/hooks/TextViewHook.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/ru/vtosters/lite/themes/hooks/TextViewHook.java b/app/src/main/java/ru/vtosters/lite/themes/hooks/TextViewHook.java index 0529d63a8..616310271 100644 --- a/app/src/main/java/ru/vtosters/lite/themes/hooks/TextViewHook.java +++ b/app/src/main/java/ru/vtosters/lite/themes/hooks/TextViewHook.java @@ -8,6 +8,7 @@ import android.widget.TextView; import androidx.appcompat.widget.AppCompatCheckedTextView; +import com.vk.core.view.OverlayTextView; import com.vk.core.view.TintTextView; import com.vk.core.view.links.LinkedTextView; import com.vtosters.lite.R; @@ -45,6 +46,15 @@ public class TextViewHook implements BaseHook { view.setBackgroundTintList(ColorStateList.valueOf(ThemesUtils.getAccentColor())); } + if (view instanceof OverlayTextView) { + if (view.getId() == android.R.id.button1) { + view.setBackground(ThemesUtils.recolorDrawable(view.getBackground())); + } + if (ColorReferences.isAccentedColor(((OverlayTextView) view).getTextColors().getDefaultColor())) { + ((OverlayTextView) view).setTextColor(ThemesUtils.getAccentColor()); + } + } + if (view instanceof TintTextView) { if (eligibleForStartTinting((TintTextView) view)) { ((TintTextView) view).setDrawableStartTint(ThemesUtils.getAccentColor());