Update styling of last seen divider.

This commit is contained in:
Greyson Parrelli
2021-01-23 15:02:11 -05:00
parent e05cadafe6
commit c650a978e9
2 changed files with 12 additions and 1 deletions

View File

@@ -363,8 +363,10 @@ public class ConversationAdapter
if (hasWallpaper) {
viewHolder.setBackgroundRes(R.drawable.wallpaper_bubble_background_8);
viewHolder.setDividerColor(viewHolder.itemView.getResources().getColor(R.color.transparent_black_80));
} else {
viewHolder.clearBackground();
viewHolder.setDividerColor(viewHolder.itemView.getResources().getColor(R.color.core_grey_45));
}
}
@@ -605,10 +607,12 @@ public class ConversationAdapter
static class StickyHeaderViewHolder extends RecyclerView.ViewHolder {
TextView textView;
View divider;
StickyHeaderViewHolder(View itemView) {
super(itemView);
textView = itemView.findViewById(R.id.text);
divider = itemView.findViewById(R.id.last_seen_divider);
}
StickyHeaderViewHolder(TextView textView) {
@@ -628,6 +632,12 @@ public class ConversationAdapter
textView.setBackgroundResource(resId);
}
public void setDividerColor(@ColorInt int color) {
if (divider != null) {
divider.setBackgroundColor(color);
}
}
public void clearBackground() {
textView.setBackground(null);
}

View File

@@ -9,8 +9,9 @@
android:paddingBottom="20dp">
<View
android:id="@+id/last_seen_divider"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_height="1dp"
android:layout_marginBottom="3dp"
android:background="@color/core_grey_45" />