sms-translate/app/src/main/res/layout/item_message.xml
2020-04-10 23:36:44 +02:00

64 lines
2.5 KiB
XML

<?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/message_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/message_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin">
<ImageView
android:id="@+id/message_image"
android:layout_width="@dimen/normal_icon_size"
android:layout_height="@dimen/normal_icon_size"
android:layout_alignTop="@+id/message_address"
android:layout_alignBottom="@+id/message_date"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/normal_margin"
android:layout_marginEnd="@dimen/normal_margin" />
<TextView
android:id="@+id/message_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/message_image"
android:ellipsize="end"
android:maxLines="1"
android:paddingEnd="@dimen/activity_margin"
android:textSize="@dimen/big_text_size"
tools:text="John" />
<TextView
android:id="@+id/message_body_short"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/message_address"
android:layout_toEndOf="@+id/message_image"
android:ellipsize="end"
android:maxLines="1"
android:paddingEnd="@dimen/activity_margin"
android:textSize="@dimen/normal_text_size"
tools:text="Hey buddy!" />
<TextView
android:id="@+id/message_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/message_body_short"
android:layout_marginTop="@dimen/tiny_margin"
android:layout_toEndOf="@+id/message_image"
android:alpha="0.4"
android:textSize="@dimen/smaller_text_size"
tools:text="13:30" />
</RelativeLayout>
</FrameLayout>