Use card view for account color

pull/161/head
M66B 5 years ago
parent 37b7232aa1
commit 44ea50d05b

@ -87,6 +87,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.PopupMenu;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Group;
import androidx.fragment.app.Fragment;
@ -226,7 +227,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
View.OnClickListener, View.OnLongClickListener, View.OnKeyListener,
BottomNavigationView.OnNavigationItemSelectedListener {
private View view;
private View vwColor;
private CardView vwColor;
private ImageView ivExpander;
private ImageView ivFlagged;
private ImageView ivAvatar;
@ -644,7 +645,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvTime.setTextColor(colorUnseen);
// Account color
vwColor.setBackgroundColor(message.accountColor == null ? Color.TRANSPARENT : message.accountColor);
vwColor.setCardBackgroundColor(message.accountColor == null ? Color.TRANSPARENT : message.accountColor);
vwColor.setVisibility(Helper.isPro(context) ? View.VISIBLE : View.INVISIBLE);
// Expander

@ -5,11 +5,13 @@
android:layout_height="wrap_content"
android:paddingEnd="3dp">
<View
<androidx.cardview.widget.CardView
android:id="@+id/vwColor"
android:layout_width="6dp"
android:layout_height="0dp"
android:background="?attr/colorAccent"
app:cardBackgroundColor="?attr/colorAccent"
app:cardCornerRadius="3dp"
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="@+id/paddingBottom"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

@ -4,11 +4,13 @@
android:layout_height="wrap_content"
android:paddingEnd="3dp">
<View
<androidx.cardview.widget.CardView
android:id="@+id/vwColor"
android:layout_width="6dp"
android:layout_height="0dp"
android:background="?attr/colorAccent"
app:cardBackgroundColor="?attr/colorAccent"
app:cardCornerRadius="3dp"
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="@+id/paddingBottom"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Loading…
Cancel
Save