Show account separate notifications

pull/153/head
M66B 6 years ago
parent 79bbfdd211
commit 44df12724f

@ -63,6 +63,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
private View view;
private View vwColor;
private ImageView ivPrimary;
private ImageView ivNotify;
private TextView tvName;
private ImageView ivSync;
private TextView tvUser;
@ -79,6 +80,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
vwColor = itemView.findViewById(R.id.vwColor);
ivSync = itemView.findViewById(R.id.ivSync);
ivPrimary = itemView.findViewById(R.id.ivPrimary);
ivNotify = itemView.findViewById(R.id.ivNotify);
tvName = itemView.findViewById(R.id.tvName);
tvUser = itemView.findViewById(R.id.tvUser);
ivState = itemView.findViewById(R.id.ivState);
@ -103,6 +105,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
ivSync.setImageResource(account.synchronize ? R.drawable.baseline_sync_24 : R.drawable.baseline_sync_disabled_24);
ivPrimary.setVisibility(account.primary ? View.VISIBLE : View.GONE);
ivNotify.setVisibility(account.notify ? View.VISIBLE : View.GONE);
if (settings)
tvName.setText(account.name);

@ -34,6 +34,7 @@ public class TupleAccountEx extends EntityAccount {
Objects.equals(this.color, other.color) &&
this.synchronize.equals(other.synchronize) &&
this.primary.equals(other.primary) &&
this.notify.equals(other.notify) &&
Objects.equals(this.tbd, other.tbd) &&
Objects.equals(this.state, other.state) &&
Objects.equals(this.error, other.error) &&

@ -43,12 +43,21 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:src="@drawable/baseline_star_24"
app:layout_constraintBottom_toBottomOf="@+id/tvName"
app:layout_constraintStart_toEndOf="@id/ivState"
app:layout_constraintTop_toTopOf="@+id/tvName" />
<ImageView
android:id="@+id/ivNotify"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="6dp"
android:src="@drawable/baseline_notifications_24"
app:layout_constraintBottom_toBottomOf="@+id/tvName"
app:layout_constraintStart_toEndOf="@id/ivPrimary"
app:layout_constraintTop_toTopOf="@+id/tvName" />
<TextView
android:id="@+id/tvName"
android:layout_width="0dp"
@ -62,7 +71,7 @@
android:text="Name"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintEnd_toStartOf="@+id/ivSync"
app:layout_constraintStart_toEndOf="@id/ivPrimary"
app:layout_constraintStart_toEndOf="@id/ivNotify"
app:layout_constraintTop_toBottomOf="@id/marginTop" />
<ImageView

Loading…
Cancel
Save