diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-01-26 03:27:55 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-01-26 03:27:55 +0100 |
commit | 898b0ca8c485888e06e2b5b1c798eebce1a6dabc (patch) | |
tree | f737883fd44da0270ed5ae0f76560d202d55ff24 /res | |
parent | 665ef7511f5dcccb349228baa2aa6f02281d3c07 (diff) |
chat bubbles. yeah
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/message_border.xml | 6 | ||||
-rw-r--r-- | res/layout/conversation_list_row.xml | 2 | ||||
-rw-r--r-- | res/layout/fragment_conversation.xml | 85 | ||||
-rw-r--r-- | res/layout/message_sent.xml | 53 | ||||
-rw-r--r-- | res/values/strings.xml | 2 |
5 files changed, 100 insertions, 48 deletions
diff --git a/res/drawable/message_border.xml b/res/drawable/message_border.xml new file mode 100644 index 00000000..1477fbe8 --- /dev/null +++ b/res/drawable/message_border.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> + <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> + <corners android:radius="2dp"/> + <padding android:left="1.5dp" android:right="1.5dp" android:top="1.5dp" android:bottom="1.5dp"/> + <solid android:color="#cecece"/> +</shape>
\ No newline at end of file diff --git a/res/layout/conversation_list_row.xml b/res/layout/conversation_list_row.xml index cfac7175..303fdd1d 100644 --- a/res/layout/conversation_list_row.xml +++ b/res/layout/conversation_list_row.xml @@ -38,7 +38,7 @@ android:paddingTop="3dp"/> <TextView - android:id="@+id/duration" + android:id="@+id/conversation_lastupdate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/conversation_name" diff --git a/res/layout/fragment_conversation.xml b/res/layout/fragment_conversation.xml index 02fe1f90..11859573 100644 --- a/res/layout/fragment_conversation.xml +++ b/res/layout/fragment_conversation.xml @@ -1,64 +1,55 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#f9f9f9"> - + android:background="#e5e5e5" > + <RelativeLayout + android:background="#eee" android:id="@+id/textsend" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" > - - <EditText - android:id="@+id/editText1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_toLeftOf="@+id/imageButton1" - android:ems="10" - android:inputType="textMultiLine" - android:minLines="1" - android:background="#ffffff" - android:layout_marginTop="12dp" - android:layout_marginBottom="12dp" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp"> - </EditText> - <ImageButton - android:id="@+id/imageButton1" - android:layout_width="48dp" - android:layout_height="48dp" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:background="?android:selectableItemBackground" - android:src="@drawable/ic_action_send_now" /> + <EditText + android:id="@+id/textinput" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minHeight="48dp" + android:layout_alignParentLeft="true" + android:paddingBottom="12dp" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:paddingTop="12dp" + android:layout_toLeftOf="@+id/textSendButton" + android:background="#eee" + android:ems="10" + android:inputType="textMultiLine" + android:minLines="1" > + </EditText> + <ImageButton + android:id="@+id/textSendButton" + android:layout_width="48dp" + android:layout_height="48dp" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:background="?android:selectableItemBackground" + android:src="@drawable/ic_action_send_now" /> </RelativeLayout> - - <ScrollView - android:id="@+id/scrollView1" + + <ListView + android:id="@+id/messages_view" android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_height="wrap_content" android:layout_above="@+id/textsend" android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" - android:background="#e5e5e5" > - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="#e5e5e5" - android:orientation="vertical" > - - <TextView - android:id="@+id/textView1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="TextView" /> - </LinearLayout> - </ScrollView> + android:background="#e5e5e5" + tools:listitem="@layout/message_sent" + android:divider="@null" + android:dividerHeight="0dp"> + </ListView> -</RelativeLayout> +</RelativeLayout>
\ No newline at end of file diff --git a/res/layout/message_sent.xml b/res/layout/message_sent.xml new file mode 100644 index 00000000..c690c217 --- /dev/null +++ b/res/layout/message_sent.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="8dp"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/message_border" + android:layout_toLeftOf="@+id/message_photo" + android:layout_alignParentLeft="true" + android:layout_alignParentBottom="true" + android:minHeight="48dp" + > +<LinearLayout + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:background="#ededed" + android:padding="5dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Hi, how are you?" + android:textSize="16sp" + android:id="@+id/message_body" + android:textColor="#333333"/> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingTop="1dp" + android:text="@string/sending" + android:textColor="#8e8e8e" + android:textSize="12sp" + android:id="@+id/message_time"/> + + </LinearLayout> +</LinearLayout> + <ImageView + android:id="@+id/message_photo" + android:layout_width="48dp" + android:layout_height="48dp" + android:layout_alignParentBottom="true" + android:layout_alignParentRight="true" + android:layout_marginLeft="-1.5dp" + android:padding="0dp" + android:src="@drawable/ic_profile" + android:scaleType="fitXY"/> + +</RelativeLayout> diff --git a/res/values/strings.xml b/res/values/strings.xml index d6849e02..d48f23cd 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -9,4 +9,6 @@ <string name="action_details">Show details</string> <string name="action_secure">Secure conversation</string> <string name="title_activity_new_conversation">New Conversation</string> + <string name="just_now">just now</string> + <string name="sending">sending…</string> </resources> |