Show account separate notifications

This commit is contained in:
M66B 2019-03-19 17:55:54 +00:00
parent 79bbfdd211
commit 44df12724f
3 changed files with 15 additions and 2 deletions

View File

@ -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);

View File

@ -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) &&

View File

@ -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