select item normally instead of using checkbox

This commit is contained in:
adbenitez
2024-08-27 13:12:52 +02:00
parent 78ad04bd7b
commit 95f09a67f5
2 changed files with 1 additions and 15 deletions
@@ -30,7 +30,6 @@ public class AccountSelectionListItem extends LinearLayout {
private TextView addrView;
private TextView nameView;
private ImageView unreadIndicator;
private ImageView checkbox;
private int accountId;
@@ -50,7 +49,6 @@ public class AccountSelectionListItem extends LinearLayout {
this.addrView = findViewById(R.id.addr);
this.nameView = findViewById(R.id.name);
this.unreadIndicator = findViewById(R.id.unread_indicator);
this.checkbox = findViewById(R.id.checkbox);
ViewUtil.setTextViewGravityStart(this.nameView, getContext());
}
@@ -87,14 +85,13 @@ public class AccountSelectionListItem extends LinearLayout {
nameView.setCompoundDrawablesWithIntrinsicBounds(isMuted? R.drawable.ic_volume_off_grey600_18dp : 0, 0, 0, 0);
setSelected(selected);
if (selected) {
addrView.setTypeface(null, Typeface.BOLD);
nameView.setTypeface(null, Typeface.BOLD);
checkbox.setVisibility(View.VISIBLE);
} else {
addrView.setTypeface(null, Typeface.NORMAL);
nameView.setTypeface(null, accountId == DcContact.DC_CONTACT_ID_ADD_ACCOUNT? Typeface.BOLD : Typeface.NORMAL);
checkbox.setVisibility(View.GONE);
}
updateUnreadIndicator(unreadCount, isMuted);
@@ -30,17 +30,6 @@
tools:src="@color/blue_600"
android:contentDescription="@null" />
<ImageView
android:id="@+id/checkbox"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="22dp"
android:layout_marginTop="22dp"
app:layout_constraintStart_toStartOf="@id/contact_photo_image"
app:layout_constraintTop_toTopOf="@id/contact_photo_image"
android:src="@drawable/ic_circle_checkbox"
android:contentDescription="@null" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout android:layout_width="0dp"