mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[android] Improve phone item view
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
jeanbaptisteC
parent
0efe782325
commit
1d7cf5ae39
@@ -113,9 +113,6 @@ public class PhoneListAdapter extends RecyclerView.Adapter<PhoneListAdapter.View
|
|||||||
|
|
||||||
deleteButton = itemView.findViewById(R.id.delete_icon);
|
deleteButton = itemView.findViewById(R.id.delete_icon);
|
||||||
deleteButton.setOnClickListener(this);
|
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)
|
public void setPosition(int position)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
android:layout_height="@dimen/height_item_oneline"
|
android:layout_height="@dimen/height_item_oneline"
|
||||||
android:background="?clickableBackground"
|
android:background="?clickableBackground"
|
||||||
android:paddingStart="@dimen/margin_half_plus"
|
android:paddingStart="@dimen/margin_half_plus"
|
||||||
android:paddingEnd="@dimen/margin_half">
|
android:paddingEnd="@dimen/margin_half_plus">
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/phone_icon"
|
android:id="@+id/phone_icon"
|
||||||
@@ -15,14 +15,15 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/phone_input"
|
app:layout_constraintEnd_toStartOf="@+id/phone_input"
|
||||||
tools:ignore="ContentDescription"
|
app:srcCompat="@drawable/ic_phone"
|
||||||
tools:src="@drawable/ic_phone"/>
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/phone_input"
|
android:id="@+id/phone_input"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/margin_half"
|
android:layout_marginStart="@dimen/margin_half"
|
||||||
|
android:layout_marginEnd="@dimen/margin_half"
|
||||||
android:layout_toStartOf="@id/delete_icon"
|
android:layout_toStartOf="@id/delete_icon"
|
||||||
android:textColorHint="?android:textColorSecondary"
|
android:textColorHint="?android:textColorSecondary"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
@@ -41,13 +42,11 @@
|
|||||||
android:id="@+id/delete_icon"
|
android:id="@+id/delete_icon"
|
||||||
style="@style/MwmWidget.Editor.MetadataIcon"
|
style="@style/MwmWidget.Editor.MetadataIcon"
|
||||||
android:layout_marginStart="@dimen/margin_half"
|
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_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:ignore="ContentDescription"
|
app:layout_constraintStart_toEndOf="@+id/phone_input"
|
||||||
tools:src="@drawable/ic_delete" />
|
app:srcCompat="@drawable/ic_delete"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user