fragment_conversation.xml

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