From 77237decb0c90c5d788df9ca9d10d7e75403e99f Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 18 Nov 2014 00:04:11 +0200 Subject: [PATCH] Added proper chat layout. --- .../main/res/drawable/message_background.xml | 10 +++ .../main/res/layout/activity_add_contacts.xml | 2 + app/src/main/res/layout/activity_main.xml | 2 + .../main/res/layout/dialog_add_contact.xml | 2 + app/src/main/res/layout/fragment_chat.xml | 83 +++++++++---------- app/src/main/res/layout/fragment_contacts.xml | 2 + app/src/main/res/layout/item_message.xml | 17 ++++ app/src/main/res/values-v21/style.xml | 1 + app/src/main/res/values/colors.xml | 11 +++ app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/style.xml | 1 + app/src/main/res/xml/settings.xml | 1 + .../ensichat/fragments/ChatFragment.scala | 4 +- .../ensichat/util/MessagesAdapter.scala | 32 +++++-- 14 files changed, 117 insertions(+), 52 deletions(-) create mode 100644 app/src/main/res/drawable/message_background.xml create mode 100644 app/src/main/res/layout/item_message.xml create mode 100644 app/src/main/res/values/colors.xml diff --git a/app/src/main/res/drawable/message_background.xml b/app/src/main/res/drawable/message_background.xml new file mode 100644 index 0000000..14a6988 --- /dev/null +++ b/app/src/main/res/drawable/message_background.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_add_contacts.xml b/app/src/main/res/layout/activity_add_contacts.xml index 308529f..657d19e 100644 --- a/app/src/main/res/layout/activity_add_contacts.xml +++ b/app/src/main/res/layout/activity_add_contacts.xml @@ -1,3 +1,5 @@ + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index da8b68a..5cb293b 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,3 +1,5 @@ + + + + - + android:layout_width="match_parent" + android:layout_weight="11" + android:layout_marginLeft="10dip" + android:layout_marginRight="10dip" + android:layout_marginBottom="2dip" + android:background="@color/chat_background"> - + android:stackFromBottom="true" + android:transcriptMode="normal" + android:divider="@android:color/transparent" + android:dividerHeight="5dp"/> - + - + + - + - - - - -