Fix footer icon tints.

This commit is contained in:
Greyson Parrelli
2018-07-20 15:40:13 -07:00
parent 860047c2d3
commit aa25f39fe9
10 changed files with 34 additions and 16 deletions

View File

@@ -60,7 +60,8 @@ public class ConversationItemFooter extends LinearLayout {
if (attrs != null) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.ConversationItemFooter, 0, 0);
setColor(typedArray.getInt(R.styleable.ConversationItemFooter_footer_color, getResources().getColor(R.color.core_white)));
setTextColor(typedArray.getInt(R.styleable.ConversationItemFooter_footer_text_color, getResources().getColor(R.color.core_white)));
setIconColor(typedArray.getInt(R.styleable.ConversationItemFooter_footer_icon_color, getResources().getColor(R.color.core_white)));
typedArray.recycle();
}
}
@@ -79,11 +80,15 @@ public class ConversationItemFooter extends LinearLayout {
presentDeliveryStatus(messageRecord);
}
public void setColor(int color) {
public void setTextColor(int color) {
dateView.setTextColor(color);
simView.setTextColor(color);
}
public void setIconColor(int color) {
timerView.setColorFilter(color);
insecureIndicatorView.setColorFilter(color);
deliveryStatusView.setTint(color);
}
private void presentDate(@NonNull MessageRecord messageRecord, @NonNull Locale locale) {

View File

@@ -91,11 +91,15 @@ public class SharedContactView extends LinearLayout implements RecipientModified
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.SharedContactView, 0, 0);
int titleColor = typedArray.getInt(R.styleable.SharedContactView_contact_titleColor, Color.BLACK);
int captionColor = typedArray.getInt(R.styleable.SharedContactView_contact_captionColor, Color.BLACK);
int iconColor = typedArray.getInt(R.styleable.SharedContactView_contact_footerIconColor, Color.BLACK);
float footerAlpha = typedArray.getFloat(R.styleable.SharedContactView_contact_footerAlpha, 1);
typedArray.recycle();
nameView.setTextColor(titleColor);
numberView.setTextColor(captionColor);
footer.setColor(captionColor);
footer.setTextColor(captionColor);
footer.setIconColor(iconColor);
footer.setAlpha(footerAlpha);
}
if (cornerMask.isLegacy()) {