[android] Improve phone item view

Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
Jean-Baptiste
2025-10-11 22:31:32 +02:00
committed by jeanbaptisteC
parent 0efe782325
commit 1d7cf5ae39
2 changed files with 7 additions and 11 deletions

View File

@@ -113,9 +113,6 @@ public class PhoneListAdapter extends RecyclerView.Adapter<PhoneListAdapter.View
deleteButton = itemView.findViewById(R.id.delete_icon);
deleteButton.setOnClickListener(this);
// TODO: setting icons from code because icons defined in layout XML are white.
deleteButton.setImageResource(R.drawable.ic_delete);
((ShapeableImageView) itemView.findViewById(R.id.phone_icon)).setImageResource(R.drawable.ic_phone);
}
public void setPosition(int position)

View File

@@ -6,7 +6,7 @@
android:layout_height="@dimen/height_item_oneline"
android:background="?clickableBackground"
android:paddingStart="@dimen/margin_half_plus"
android:paddingEnd="@dimen/margin_half">
android:paddingEnd="@dimen/margin_half_plus">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/phone_icon"
@@ -15,14 +15,15 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/phone_input"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_phone"/>
app:srcCompat="@drawable/ic_phone"
tools:ignore="ContentDescription" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/phone_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_half"
android:layout_marginEnd="@dimen/margin_half"
android:layout_toStartOf="@id/delete_icon"
android:textColorHint="?android:textColorSecondary"
app:layout_constraintBottom_toBottomOf="parent"
@@ -41,13 +42,11 @@
android:id="@+id/delete_icon"
style="@style/MwmWidget.Editor.MetadataIcon"
android:layout_marginStart="@dimen/margin_half"
android:layout_marginTop="@dimen/margin_half"
android:layout_marginEnd="@dimen/margin_half"
android:layout_marginBottom="@dimen/margin_half"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_delete" />
app:layout_constraintStart_toEndOf="@+id/phone_input"
app:srcCompat="@drawable/ic_delete"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>