fragment_conversation.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<layout xmlns:android="http://schemas.android.com/apk/res/android">
  3
  4    <RelativeLayout
  5        xmlns:tools="http://schemas.android.com/tools"
  6        android:layout_width="match_parent"
  7        android:layout_height="match_parent"
  8        android:background="?attr/color_background_secondary">
  9
 10        <ListView
 11            android:id="@+id/messages_view"
 12            android:layout_width="fill_parent"
 13            android:layout_height="wrap_content"
 14            android:layout_above="@+id/snackbar"
 15            android:layout_alignParentLeft="true"
 16            android:layout_alignParentTop="true"
 17            android:background="?attr/color_background_secondary"
 18            android:divider="@null"
 19            android:dividerHeight="0dp"
 20            android:listSelector="@android:color/transparent"
 21            android:stackFromBottom="true"
 22            android:transcriptMode="normal"
 23            tools:listitem="@layout/message_sent">
 24        </ListView>
 25
 26        <RelativeLayout
 27            android:id="@+id/textsend"
 28            android:layout_width="fill_parent"
 29            android:layout_height="wrap_content"
 30            android:layout_alignParentBottom="true"
 31            android:layout_alignParentLeft="true"
 32            android:background="?attr/color_background_primary">
 33
 34            <eu.siacs.conversations.ui.widget.EditMessage
 35                android:id="@+id/textinput"
 36                android:layout_width="wrap_content"
 37                android:layout_height="wrap_content"
 38                android:layout_alignParentLeft="true"
 39                android:layout_toLeftOf="@+id/textSendButton"
 40                android:background="?attr/color_background_primary"
 41                android:ems="10"
 42                android:imeOptions="flagNoExtractUi|actionSend"
 43                android:inputType="textShortMessage|textMultiLine|textCapSentences"
 44                android:maxLines="8"
 45                android:minHeight="48dp"
 46                android:minLines="1"
 47                android:paddingBottom="12dp"
 48                android:paddingLeft="8dp"
 49                android:paddingRight="8dp"
 50                android:paddingTop="12dp"
 51                android:textColor="?attr/color_text_primary">
 52
 53                <requestFocus/>
 54            </eu.siacs.conversations.ui.widget.EditMessage>
 55
 56            <ImageButton
 57                android:id="@+id/textSendButton"
 58                android:layout_width="48dp"
 59                android:layout_height="48dp"
 60                android:layout_alignParentRight="true"
 61                android:layout_centerVertical="true"
 62                android:background="?attr/color_background_primary"
 63                android:contentDescription="@string/send_message"
 64                android:src="?attr/ic_send_text_offline"/>
 65        </RelativeLayout>
 66
 67        <RelativeLayout
 68            android:id="@+id/snackbar"
 69            android:layout_width="fill_parent"
 70            android:layout_height="wrap_content"
 71            android:layout_above="@+id/textsend"
 72            android:layout_marginBottom="4dp"
 73            android:layout_marginLeft="8dp"
 74            android:layout_marginRight="8dp"
 75            android:background="@drawable/snackbar"
 76            android:minHeight="48dp"
 77            android:visibility="gone">
 78
 79            <TextView
 80                android:id="@+id/snackbar_message"
 81                android:layout_width="wrap_content"
 82                android:layout_height="wrap_content"
 83                android:layout_alignParentLeft="true"
 84                android:layout_centerVertical="true"
 85                android:layout_toLeftOf="@+id/snackbar_action"
 86                android:paddingLeft="24dp"
 87                android:textColor="@color/white"
 88                android:textSize="?attr/TextSizeBody"/>
 89
 90            <TextView
 91                android:id="@+id/snackbar_action"
 92                android:layout_width="wrap_content"
 93                android:layout_height="wrap_content"
 94                android:layout_alignParentRight="true"
 95                android:layout_centerVertical="true"
 96                android:paddingBottom="16dp"
 97                android:paddingLeft="24dp"
 98                android:paddingRight="24dp"
 99                android:paddingTop="16dp"
100                android:textAllCaps="true"
101                android:textColor="@color/white"
102                android:textSize="?attr/TextSizeBody"
103                android:textStyle="bold"/>
104        </RelativeLayout>
105
106    </RelativeLayout>
107</layout>