adding an initial Recents adapter

This commit is contained in:
tibbi
2020-05-08 20:26:45 +02:00
parent 62264ae044
commit 73c939b435
7 changed files with 124 additions and 7 deletions

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/item_recents_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/selector">
<RelativeLayout
android:id="@+id/item_recents_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/min_row_height"
android:paddingStart="@dimen/tiny_margin"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/medium_margin">
<ImageView
android:id="@+id/item_recents_image"
android:layout_width="@dimen/normal_icon_size"
android:layout_height="@dimen/normal_icon_size"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/small_margin"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_person_vector" />
<TextView
android:id="@+id/item_recents_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/item_recents_image"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:paddingStart="@dimen/medium_margin"
android:paddingEnd="@dimen/activity_margin"
android:textSize="@dimen/bigger_text_size"
tools:text="John Doe" />
</RelativeLayout>
</FrameLayout>