Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
improved the ChatActivity layout
Browse files Browse the repository at this point in the history
  • Loading branch information
smukov committed Jun 26, 2016
1 parent 511024c commit aaaf316
Showing 1 changed file with 36 additions and 42 deletions.
78 changes: 36 additions & 42 deletions Android/app/src/main/res/layout/activity_chat.xml
Original file line number Diff line number Diff line change
@@ -1,53 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
android:padding="20dp">

<RelativeLayout
android:id="@+id/container"
<LinearLayout
android:id="@+id/chatControls"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="20dp">
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">

<LinearLayout
android:id="@+id/chatControls"
android:orientation="horizontal"
android:layout_width="match_parent"
<EditText
android:id="@+id/messageEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">

<EditText
android:id="@+id/messageEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:hint="@string/typeMessage"
android:layout_weight="0.8"/>
android:inputType="textMultiLine"
android:hint="@string/typeMessage"
android:layout_weight="0.8"/>

<ImageButton
android:id="@+id/chatSendButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/ic_menu_send"
android:background="@android:color/transparent"
android:layout_weight="0.2"/>
<ImageButton
android:id="@+id/chatSendButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/ic_menu_send"
android:background="@android:color/transparent"
android:layout_weight="0.2"/>

</LinearLayout>
</LinearLayout>

<ListView
android:id="@+id/messagesContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="false"
android:layout_alignParentTop="false"
android:layout_marginBottom="20dp"
android:layout_above="@+id/chatControls"
android:layout_marginTop="10dp"
android:listSelector="@android:color/transparent"
android:transcriptMode="alwaysScroll"
android:divider="@null" />
<ListView
android:id="@+id/messagesContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="false"
android:layout_alignParentTop="false"
android:layout_marginBottom="20dp"
android:layout_above="@+id/chatControls"
android:layout_marginTop="10dp"
android:listSelector="@android:color/transparent"
android:transcriptMode="alwaysScroll"
android:divider="@null" />

</RelativeLayout>
</LinearLayout>
</RelativeLayout>

0 comments on commit aaaf316

Please sign in to comment.