Add a menu to change status in contact list.
authorDa Risk <darisk972@gmail.com>
Thu, 03 Jun 2010 21:59:08 +0200
changeset 763 e6a235546a90
parent 762 56d44e5c7081
child 764 3d6983b46a03
child 766 ca06684fb92f
Add a menu to change status in contact list.
res/layout/chat.xml
res/menu/contact_list.xml
res/values-fr/strings.xml
res/values/strings.xml
src/com/beem/project/beem/ui/ContactList.java
--- a/res/layout/chat.xml	Thu Jun 03 21:43:32 2010 +0200
+++ b/res/layout/chat.xml	Thu Jun 03 21:59:08 2010 +0200
@@ -29,14 +29,14 @@
 	<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_width="fill_parent" android:layout_height="0dip"
 		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="wrap_content"
+		<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"
--- a/res/menu/contact_list.xml	Thu Jun 03 21:43:32 2010 +0200
+++ b/res/menu/contact_list.xml	Thu Jun 03 21:59:08 2010 +0200
@@ -3,6 +3,9 @@
 		android:visible="true"
 		android:title="@string/contact_list_menu_add_contact"
 		android:icon="@drawable/ic_menu_add" />
+	<item android:id="@+id/menu_change_status"
+	    android:visible="true"
+	    android:title="@string/contact_list_menu_status"/>
 	<item android:id="@+id/contact_list_menu_settings"
 		android:visible="true"
 		android:title="@string/contact_list_menu_settings"
--- a/res/values-fr/strings.xml	Thu Jun 03 21:43:32 2010 +0200
+++ b/res/values-fr/strings.xml	Thu Jun 03 21:59:08 2010 +0200
@@ -230,6 +230,7 @@
 		ContactList Activity 
 	 -->
 	<string name="contact_list_menu_add_contact">Ajouter un contact</string>
+	<string name="contact_list_menu_status">Changer son status</string>
 	<string name="contact_list_menu_settings">Param├Ętres</string>
 	<string name="contact_list_menu_disconnect">Se d├ęconnecter</string>
 	<string name="contact_list_all_contact">Tous les contacts</string>
--- a/res/values/strings.xml	Thu Jun 03 21:43:32 2010 +0200
+++ b/res/values/strings.xml	Thu Jun 03 21:59:08 2010 +0200
@@ -219,6 +219,7 @@
 
 	<!-- ContactList Activity  -->
 	<string name="contact_list_menu_add_contact">Add a contact</string>
+	<string name="contact_list_menu_status">Change status</string>
 	<string name="contact_list_menu_settings">Settings</string>
 	<string name="contact_list_menu_disconnect">Disconnect</string>
 	<string name="contact_list_all_contact">All contacts</string>
--- a/src/com/beem/project/beem/ui/ContactList.java	Thu Jun 03 21:43:32 2010 +0200
+++ b/src/com/beem/project/beem/ui/ContactList.java	Thu Jun 03 21:59:08 2010 +0200
@@ -160,6 +160,9 @@
 	    case R.id.contact_list_menu_add_contact:
 		startActivity(new Intent(ContactList.this, AddContact.class));
 		return true;
+	    case R.id.menu_change_status:
+		startActivity(new Intent(ContactList.this, ChangeStatus.class));
+		return true;
 	    case R.id.menu_disconnect:
 		stopService(SERVICE_INTENT);
 		finish();