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) {
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -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" />
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue