kopia lustrzana https://github.com/ryukoposting/Signal-Android
Update styling of last seen divider.
rodzic
e05cadafe6
commit
c650a978e9
|
@ -363,8 +363,10 @@ public class ConversationAdapter
|
||||||
|
|
||||||
if (hasWallpaper) {
|
if (hasWallpaper) {
|
||||||
viewHolder.setBackgroundRes(R.drawable.wallpaper_bubble_background_8);
|
viewHolder.setBackgroundRes(R.drawable.wallpaper_bubble_background_8);
|
||||||
|
viewHolder.setDividerColor(viewHolder.itemView.getResources().getColor(R.color.transparent_black_80));
|
||||||
} else {
|
} else {
|
||||||
viewHolder.clearBackground();
|
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 {
|
static class StickyHeaderViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView textView;
|
TextView textView;
|
||||||
|
View divider;
|
||||||
|
|
||||||
StickyHeaderViewHolder(View itemView) {
|
StickyHeaderViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
textView = itemView.findViewById(R.id.text);
|
textView = itemView.findViewById(R.id.text);
|
||||||
|
divider = itemView.findViewById(R.id.last_seen_divider);
|
||||||
}
|
}
|
||||||
|
|
||||||
StickyHeaderViewHolder(TextView textView) {
|
StickyHeaderViewHolder(TextView textView) {
|
||||||
|
@ -628,6 +632,12 @@ public class ConversationAdapter
|
||||||
textView.setBackgroundResource(resId);
|
textView.setBackgroundResource(resId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDividerColor(@ColorInt int color) {
|
||||||
|
if (divider != null) {
|
||||||
|
divider.setBackgroundColor(color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void clearBackground() {
|
public void clearBackground() {
|
||||||
textView.setBackground(null);
|
textView.setBackground(null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,9 @@
|
||||||
android:paddingBottom="20dp">
|
android:paddingBottom="20dp">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/last_seen_divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1dp"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginBottom="3dp"
|
||||||
android:background="@color/core_grey_45" />
|
android:background="@color/core_grey_45" />
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue