|
@@ -38,6 +38,8 @@ import com.tencent.qcloud.tuikit.tuichat.config.TUIChatConfigs;
|
|
|
public class IMThemManager {
|
|
|
private Drawable tabIndicatorDrawable = null;
|
|
|
private int mainStyleColor = -1;
|
|
|
+
|
|
|
+ private int mainStyleColor2 = -1;
|
|
|
private int searchTextColor = -1;
|
|
|
private int searchIconRes = -1;
|
|
|
private int searchBtBackgroundRes = -1;
|
|
@@ -54,6 +56,7 @@ public class IMThemManager {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
private static final class IMThemManagerHolder {
|
|
|
private static IMThemManager mManager = new IMThemManager();
|
|
|
}
|
|
@@ -161,6 +164,18 @@ public class IMThemManager {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void setTextDrawableStyle(TextView textView) {
|
|
|
+ Drawable backgroundDrawable = null;
|
|
|
+ backgroundDrawable = textView.getBackground();
|
|
|
+ if (backgroundDrawable != null) {
|
|
|
+ if (mainStyleColor2 != -1) {
|
|
|
+ backgroundDrawable.setTint(mainStyleColor2);
|
|
|
+ } else {
|
|
|
+ backgroundDrawable.setTintList(null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void setEmptyDrawable(Drawable emptyDrawable) {
|
|
|
MessageProperties instance = MessageProperties.getInstance();
|
|
|
instance.setConversationListEmptyDrawable(emptyDrawable);
|
|
@@ -172,6 +187,10 @@ public class IMThemManager {
|
|
|
instance.setMainStyleColor(mainStyleColor);
|
|
|
}
|
|
|
|
|
|
+ public void setMainStyleColor2(int color) {
|
|
|
+ this.mainStyleColor2 = color;
|
|
|
+ }
|
|
|
+
|
|
|
public void setSearchTextColor(int searchTextColor) {
|
|
|
this.searchTextColor = searchTextColor;
|
|
|
MessageProperties instance = MessageProperties.getInstance();
|
|
@@ -202,6 +221,7 @@ public class IMThemManager {
|
|
|
public void resetStyleValue() {
|
|
|
this.tabIndicatorDrawable = null;
|
|
|
setMainStyleColor(-1);
|
|
|
+ this.mainStyleColor2 =-1;
|
|
|
setSearchIconRes(-1);
|
|
|
setSearchTextColor(-1);
|
|
|
this.searchBtBackgroundRes = -1;
|