fragment_conversation.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<layout xmlns:android="http://schemas.android.com/apk/res/android"
  3    xmlns:app="http://schemas.android.com/apk/res-auto">
  4
  5    <RelativeLayout
  6        xmlns:tools="http://schemas.android.com/tools"
  7        android:layout_width="match_parent"
  8        android:layout_height="match_parent"
  9        android:background="?attr/color_background_secondary">
 10
 11        <ListView
 12            android:id="@+id/messages_view"
 13            android:layout_width="fill_parent"
 14            android:layout_height="wrap_content"
 15            android:layout_above="@+id/snackbar"
 16            android:layout_alignParentLeft="true"
 17            android:layout_alignParentTop="true"
 18            android:background="?attr/color_background_secondary"
 19            android:divider="@null"
 20            android:dividerHeight="0dp"
 21            android:listSelector="@android:color/transparent"
 22            android:stackFromBottom="true"
 23            android:transcriptMode="normal"
 24            tools:listitem="@layout/message_sent">
 25        </ListView>
 26
 27        <android.support.design.widget.FloatingActionButton
 28            android:id="@+id/scroll_to_bottom_button"
 29            android:layout_width="wrap_content"
 30            android:layout_height="wrap_content"
 31            android:layout_alignParentEnd="true"
 32            android:layout_alignBottom="@+id/messages_view"
 33            android:alpha="0.85"
 34            app:backgroundTint="?attr/color_background_primary"
 35            android:src="?attr/icon_scroll_down"
 36            app:fabSize="mini"
 37            android:visibility="gone"
 38            app:useCompatPadding="true"/>
 39
 40        <eu.siacs.conversations.ui.widget.UnreadCountCustomView
 41            android:id="@+id/unread_count_custom_view"
 42            android:layout_width="?attr/IconSize"
 43            android:layout_height="?attr/IconSize"
 44            android:layout_alignTop="@+id/scroll_to_bottom_button"
 45            android:layout_alignEnd="@+id/scroll_to_bottom_button"
 46            android:layout_marginTop="16dp"
 47            android:layout_marginEnd="8dp"
 48            android:elevation="8dp"
 49            android:visibility="gone"
 50            app:backgroundColor="?attr/unread_count" />
 51
 52        <RelativeLayout
 53            android:id="@+id/textsend"
 54            android:layout_width="fill_parent"
 55            android:layout_height="wrap_content"
 56            android:layout_alignParentBottom="true"
 57            android:layout_alignParentLeft="true"
 58            android:background="?attr/color_background_primary">
 59
 60            <eu.siacs.conversations.ui.widget.EditMessage
 61                android:id="@+id/textinput"
 62                android:layout_width="wrap_content"
 63                android:layout_height="wrap_content"
 64                android:layout_alignParentLeft="true"
 65                android:layout_toLeftOf="@+id/textSendButton"
 66                android:background="?attr/color_background_primary"
 67                android:ems="10"
 68                style="@style/Widget.Conversations.EditText"
 69                android:imeOptions="flagNoExtractUi|actionSend"
 70                android:inputType="textShortMessage|textMultiLine|textCapSentences"
 71                android:maxLines="8"
 72                android:minHeight="48dp"
 73                android:minLines="1"
 74                android:paddingBottom="12dp"
 75                android:paddingLeft="8dp"
 76                android:paddingRight="8dp"
 77                android:paddingTop="12dp">
 78
 79                <requestFocus/>
 80            </eu.siacs.conversations.ui.widget.EditMessage>
 81
 82            <ImageButton
 83                android:id="@+id/textSendButton"
 84                android:layout_width="48dp"
 85                android:layout_height="48dp"
 86                android:layout_alignParentRight="true"
 87                android:layout_centerVertical="true"
 88                android:background="?attr/color_background_primary"
 89                android:contentDescription="@string/send_message"
 90                android:src="?attr/ic_send_text_offline"/>
 91        </RelativeLayout>
 92
 93        <RelativeLayout
 94            android:id="@+id/snackbar"
 95            android:layout_width="fill_parent"
 96            android:layout_height="wrap_content"
 97            android:layout_above="@+id/textsend"
 98            android:layout_marginBottom="4dp"
 99            android:layout_marginLeft="8dp"
100            android:layout_marginRight="8dp"
101            android:background="@drawable/snackbar"
102            android:minHeight="48dp"
103            android:visibility="gone">
104
105            <TextView
106                android:id="@+id/snackbar_message"
107                android:layout_width="wrap_content"
108                android:layout_height="wrap_content"
109                android:layout_alignParentLeft="true"
110                android:layout_centerVertical="true"
111                android:layout_toLeftOf="@+id/snackbar_action"
112                android:paddingLeft="24dp"
113                android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark"/>
114
115            <TextView
116                android:id="@+id/snackbar_action"
117                android:layout_width="wrap_content"
118                android:layout_height="wrap_content"
119                android:layout_alignParentRight="true"
120                android:layout_centerVertical="true"
121                android:paddingBottom="16dp"
122                android:paddingLeft="24dp"
123                android:paddingRight="24dp"
124                android:paddingTop="16dp"
125                android:textAllCaps="true"
126                android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark"
127                android:textStyle="bold"/>
128        </RelativeLayout>
129
130    </RelativeLayout>
131</layout>