added drag handle icon to item_contact_with_number.xml and item_contact_without_number.xml layouts

This commit is contained in:
Pavel Poley 2022-05-05 23:49:26 +03:00
parent 06110ebf15
commit fd50ad53ab
3 changed files with 25 additions and 1 deletions

View file

@ -31,6 +31,7 @@
android:id="@+id/item_contact_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toStartOf="@+id/drag_handle_icon"
android:layout_toEndOf="@+id/item_contact_image"
android:ellipsize="end"
android:gravity="center_vertical"
@ -46,14 +47,21 @@
android:layout_height="wrap_content"
android:layout_below="@+id/item_contact_name"
android:layout_alignStart="@+id/item_contact_name"
android:layout_toStartOf="@+id/drag_handle_icon"
android:layout_toEndOf="@+id/item_contact_image"
android:gravity="center_vertical"
android:alpha="0.6"
android:gravity="center_vertical"
android:maxLines="1"
android:paddingStart="@dimen/medium_margin"
android:paddingEnd="@dimen/activity_margin"
android:textSize="@dimen/normal_text_size"
tools:text="0123 456 789" />
<ImageView
android:id="@+id/drag_handle_icon"
style="@style/DragHandleIconStyle"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
</RelativeLayout>
</FrameLayout>

View file

@ -33,6 +33,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toStartOf="@+id/drag_handle_icon"
android:layout_toEndOf="@+id/item_contact_image"
android:ellipsize="end"
android:gravity="center_vertical"
@ -42,5 +43,11 @@
android:textSize="@dimen/big_text_size"
tools:text="John Doe" />
<ImageView
android:id="@+id/drag_handle_icon"
style="@style/DragHandleIconStyle"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
</RelativeLayout>
</FrameLayout>

View file

@ -305,6 +305,15 @@
<item name="android:paddingBottom">@dimen/bigger_margin</item>
</style>
<style name="DragHandleIconStyle">
<item name="android:src">@drawable/ic_drag_handle_vector</item>
<item name="android:layout_width">@dimen/dragselect_hotspot_height</item>
<item name="android:layout_height">@dimen/dragselect_hotspot_height</item>
<item name="android:paddingTop">@dimen/normal_margin</item>
<item name="android:paddingBottom">@dimen/normal_margin</item>
<item name="android:visibility">gone</item>
</style>
<!-- App themes -->
<!-- White -->
<style name="AppTheme.White" parent="AppTheme.Base">