-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_res_layout_activity_chat.xml
77 lines (68 loc) · 2.9 KB
/
main_res_layout_activity_chat.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#cccccc"
tools:context="com.example.harsh.freechat.ChatActivity">
<include
android:id="@+id/chat_app_bar"
layout="@layout/app_bar_layout" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/message_swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/linearLayout"
android:layout_alignParentStart="true"
android:layout_below="@+id/chat_app_bar">
<android.support.v7.widget.RecyclerView
android:id="@+id/messages_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/linearLayout"
android:layout_alignParentStart="true"
android:layout_below="@+id/chat_app_bar"></android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:background="@android:color/white"
android:orientation="horizontal"
android:weightSum="10">
<ImageButton
android:id="@+id/chat_add_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:alpha="0.5"
android:background="@android:color/white"
android:padding="10dp"
app:srcCompat="@drawable/ic_add_black_24dp" />
<EditText
android:id="@+id/chat_message_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="8"
android:background="@android:color/white"
android:ems="10"
android:hint="Enter Message..."
android:inputType="textPersonName"
android:paddingBottom="12dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="14dp" />
<ImageButton
android:id="@+id/chat_send_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:alpha="0.5"
android:background="@android:color/white"
android:padding="10dp"
app:srcCompat="@drawable/ic_send_black_24dp" />
</LinearLayout>
</RelativeLayout>