lets use the new Conversation model at the main screen
This commit is contained in:
parent
882b75324d
commit
21dd815f2a
8 changed files with 92 additions and 73 deletions
64
app/src/main/res/layout/item_conversation.xml
Normal file
64
app/src/main/res/layout/item_conversation.xml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?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/conversation_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/conversation_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/conversation_image"
|
||||
android:layout_width="@dimen/normal_icon_size"
|
||||
android:layout_height="@dimen/normal_icon_size"
|
||||
android:layout_alignTop="@+id/conversation_address"
|
||||
android:layout_alignBottom="@+id/conversation_date"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/normal_margin"
|
||||
android:layout_marginEnd="@dimen/normal_margin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/conversation_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@+id/conversation_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/conversation_body_short"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/conversation_address"
|
||||
android:layout_toEndOf="@+id/conversation_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/conversation_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/conversation_body_short"
|
||||
android:layout_marginTop="@dimen/tiny_margin"
|
||||
android:layout_toEndOf="@+id/conversation_image"
|
||||
android:alpha="0.4"
|
||||
android:textSize="@dimen/smaller_text_size"
|
||||
tools:text="13:30" />
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue