aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/res/layout
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2015-04-12 17:22:42 +0200
committerlookshe <github@lookshe.org>2015-04-12 17:22:53 +0200
commitcae106e3106d26742d94e74f96c0295270c1620e (patch)
treed1c251ffe6a8162efca5082056f93a91ce8c5bef /src/main/res/layout
parent972c65b775b2191ee5b54472e24958f3c87dbb21 (diff)
whatsapp-like smiley implementation
Diffstat (limited to 'src/main/res/layout')
-rw-r--r--src/main/res/layout/fragment_conversation.xml11
-rw-r--r--src/main/res/layout/message_received.xml9
-rw-r--r--src/main/res/layout/message_sent.xml9
3 files changed, 22 insertions, 7 deletions
diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml
index f9aae10a..b343781b 100644
--- a/src/main/res/layout/fragment_conversation.xml
+++ b/src/main/res/layout/fragment_conversation.xml
@@ -33,8 +33,8 @@
android:id="@+id/textinput"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/textSendButton"
+ android:layout_toRightOf="@+id/emoji_btn"
android:background="@color/primarybackground"
android:ems="10"
android:imeOptions="flagNoExtractUi|actionSend"
@@ -58,6 +58,15 @@
android:layout_centerVertical="true"
android:background="?android:selectableItemBackground"
android:src="@drawable/ic_action_send_now_offline" />
+
+ <ImageView
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:id="@+id/emoji_btn"
+ android:layout_centerVertical="true"
+ android:layout_alignParentLeft="true"
+ android:padding="4dp"
+ android:src="@drawable/smiley" />
</RelativeLayout>
<RelativeLayout
diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml
index 39bb842a..23997028 100644
--- a/src/main/res/layout/message_received.xml
+++ b/src/main/res/layout/message_received.xml
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:emojicon="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@@ -38,13 +40,14 @@
android:paddingBottom="2dp"
android:scaleType="centerCrop" />
- <TextView
+ <github.ankushsachdeva.emojicon.EmojiconTextView
android:id="@+id/message_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
android:textColor="@color/primarytext"
- android:textSize="?attr/TextSizeBody" />
+ android:textSize="?attr/TextSizeBody"
+ emojicon:emojiconSize="28sp" />
<Button
android:id="@+id/download_button"
diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
index 3e854643..e91c9230 100644
--- a/src/main/res/layout/message_sent.xml
+++ b/src/main/res/layout/message_sent.xml
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:emojicon="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@@ -38,13 +40,14 @@
android:paddingBottom="2dp"
android:scaleType="centerCrop" />
- <TextView
+ <github.ankushsachdeva.emojicon.EmojiconTextView
android:id="@+id/message_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
android:textColor="@color/primarytext"
- android:textSize="?attr/TextSizeBody" />
+ android:textSize="?attr/TextSizeBody"
+ emojicon:emojiconSize="28sp" />
<Button
android:id="@+id/download_button"