Use card view for account color

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

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

@ -5,11 +5,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingEnd="3dp"> android:paddingEnd="3dp">
<View <androidx.cardview.widget.CardView
android:id="@+id/vwColor" android:id="@+id/vwColor"
android:layout_width="6dp" android:layout_width="6dp"
android:layout_height="0dp" 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_constraintBottom_toBottomOf="@+id/paddingBottom"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

@ -4,11 +4,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingEnd="3dp"> android:paddingEnd="3dp">
<View <androidx.cardview.widget.CardView
android:id="@+id/vwColor" android:id="@+id/vwColor"
android:layout_width="6dp" android:layout_width="6dp"
android:layout_height="0dp" 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_constraintBottom_toBottomOf="@+id/paddingBottom"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

Loading…
Cancel
Save