res/layout/chat.xml
author Da Risk <darisk972@gmail.com>
Tue, 12 Jan 2010 23:21:16 +0100
changeset 634 bac4b1927a08
parent 537 f9d7d3876e58
child 638 f1d6e2fa672f
permissions -rw-r--r--
Use relative layout in chat activity.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="fill_parent" android:layout_height="fill_parent"
	android:orientation="vertical">
	<RelativeLayout android:id="@+id/chat_header"
		android:layout_width="fill_parent" android:layout_height="wrap_content"
		android:background="#222222" android:padding="4px">
		<ImageView android:id="@+id/chat_contact_status_icon"
			android:adjustViewBounds="true" android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_centerVertical="true" />
		<TextView android:id="@+id/chat_contact_name"
			android:layout_width="fill_parent" android:layout_height="wrap_content"
			android:layout_toRightOf="@id/chat_contact_status_icon"
			android:layout_marginLeft="15sp"
			android:lines="1" android:singleLine="true" android:textSize="16sp"
			android:textStyle="bold" android:textColor="#FFFFFF" />
		<TextView android:id="@+id/chat_contact_status_msg"
			android:layout_width="fill_parent" android:layout_height="wrap_content"
			android:layout_below="@id/chat_contact_name" android:layout_alignLeft="@id/chat_contact_name"
			android:autoLink="all" android:textSize="12sp" android:textColor="#FFFFFF"
			android:textColorLink="#FFFFFF" />
	</RelativeLayout>
	<View android:layout_width="fill_parent" android:layout_height="2dp"
		android:fadingEdge="horizontal" android:background="#555555" />
	<ListView android:id="@+id/chat_messages"
		android:layout_width="fill_parent" android:layout_height="0px"
		android:layout_weight="1" android:transcriptMode="normal"
		android:fastScrollEnabled="true" android:smoothScrollbar="false"
		android:layout_marginBottom="20sp" android:padding="4px" />
	<LinearLayout android:layout_width="fill_parent"
		android:layout_height="wrap_content" android:orientation="horizontal"
		android:background="#222222" android:padding="8px">
		<EditText android:id="@+id/chat_input" android:layout_width="0dip"
			android:layout_height="fill_parent" android:layout_weight="1"
			android:maxLines="5"
			android:inputType="textShortMessage|textAutoCorrect|textMultiLine"
			android:imeOptions="actionSend" android:cursorVisible="true"
			android:hint="@string/chat_input_default_value" />
		<Button android:id="@+id/chat_send_message"
			android:layout_width="wrap_content" android:layout_height="fill_parent"
			android:text="@string/chat_send_message" />
	</LinearLayout>
</LinearLayout>