merge
authorDa Risk <darisk972@gmail.com>
Fri, 16 Oct 2009 17:22:19 +0200
changeset 464 40f0b4dda4cb
parent 463 fbb5d00cb7ee (current diff)
parent 461 17300b201cf5 (diff)
child 465 cdfe45072e7d
merge
res/drawable/away.png
res/drawable/invisible.png
res/drawable/offline.png
Binary file res/drawable/away.png has changed
Binary file res/drawable/ic_menu_add.png has changed
Binary file res/drawable/ic_menu_agenda.png has changed
Binary file res/drawable/ic_menu_allfriends.png has changed
Binary file res/drawable/ic_menu_always_landscape_portrait.png has changed
Binary file res/drawable/ic_menu_archive.png has changed
Binary file res/drawable/ic_menu_attachment.png has changed
Binary file res/drawable/ic_menu_back.png has changed
Binary file res/drawable/ic_menu_block.png has changed
Binary file res/drawable/ic_menu_blocked_user.png has changed
Binary file res/drawable/ic_menu_call.png has changed
Binary file res/drawable/ic_menu_camera.png has changed
Binary file res/drawable/ic_menu_cc.png has changed
Binary file res/drawable/ic_menu_chat_dashboard.png has changed
Binary file res/drawable/ic_menu_clear_playlist.png has changed
Binary file res/drawable/ic_menu_close_clear_cancel.png has changed
Binary file res/drawable/ic_menu_compass.png has changed
Binary file res/drawable/ic_menu_compose.png has changed
Binary file res/drawable/ic_menu_crop.png has changed
Binary file res/drawable/ic_menu_day.png has changed
Binary file res/drawable/ic_menu_delete.png has changed
Binary file res/drawable/ic_menu_directions.png has changed
Binary file res/drawable/ic_menu_edit.png has changed
Binary file res/drawable/ic_menu_emoticons.png has changed
Binary file res/drawable/ic_menu_end_conversation.png has changed
Binary file res/drawable/ic_menu_forward.png has changed
Binary file res/drawable/ic_menu_friendslist.png has changed
Binary file res/drawable/ic_menu_gallery.png has changed
Binary file res/drawable/ic_menu_goto.png has changed
Binary file res/drawable/ic_menu_help.png has changed
Binary file res/drawable/ic_menu_home.png has changed
Binary file res/drawable/ic_menu_info_details.png has changed
Binary file res/drawable/ic_menu_invite.png has changed
Binary file res/drawable/ic_menu_login.png has changed
Binary file res/drawable/ic_menu_manage.png has changed
Binary file res/drawable/ic_menu_mapmode.png has changed
Binary file res/drawable/ic_menu_mark.png has changed
Binary file res/drawable/ic_menu_month.png has changed
Binary file res/drawable/ic_menu_more.png has changed
Binary file res/drawable/ic_menu_my_calendar.png has changed
Binary file res/drawable/ic_menu_mylocation.png has changed
Binary file res/drawable/ic_menu_myplaces.png has changed
Binary file res/drawable/ic_menu_notifications.png has changed
Binary file res/drawable/ic_menu_play_clip.png has changed
Binary file res/drawable/ic_menu_preferences.png has changed
Binary file res/drawable/ic_menu_recent_history.png has changed
Binary file res/drawable/ic_menu_refresh.png has changed
Binary file res/drawable/ic_menu_report_image.png has changed
Binary file res/drawable/ic_menu_revert.png has changed
Binary file res/drawable/ic_menu_rotate.png has changed
Binary file res/drawable/ic_menu_save.png has changed
Binary file res/drawable/ic_menu_search.png has changed
Binary file res/drawable/ic_menu_send.png has changed
Binary file res/drawable/ic_menu_set_as.png has changed
Binary file res/drawable/ic_menu_share.png has changed
Binary file res/drawable/ic_menu_slideshow.png has changed
Binary file res/drawable/ic_menu_sort_alphabetically.png has changed
Binary file res/drawable/ic_menu_sort_by_size.png has changed
Binary file res/drawable/ic_menu_star.png has changed
Binary file res/drawable/ic_menu_start_conversation.png has changed
Binary file res/drawable/ic_menu_stop.png has changed
Binary file res/drawable/ic_menu_today.png has changed
Binary file res/drawable/ic_menu_upload.png has changed
Binary file res/drawable/ic_menu_upload_you_tube.png has changed
Binary file res/drawable/ic_menu_view.png has changed
Binary file res/drawable/ic_menu_week.png has changed
Binary file res/drawable/ic_menu_zoom.png has changed
Binary file res/drawable/invisible.png has changed
Binary file res/drawable/offline.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/res/drawable/shape_border_green.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <stroke android:width="4dp" android:color="#D6F94C" />
+    <padding android:left="7dp" android:top="7dp"
+            android:right="7dp" android:bottom="7dp" />
+    <corners android:radius="4dp" />
+</shape>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/res/drawable/shape_line_green.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" type="line">
+<stroke android:width="1dp"
+		android:height="2dp"
+		android:color="#D6F94C" />
+	<size android:height="1dp" />
+</shape>
Binary file res/drawable/status_available.png has changed
Binary file res/drawable/status_away.png has changed
Binary file res/drawable/status_blocked.png has changed
Binary file res/drawable/status_dnd.png has changed
Binary file res/drawable/status_error.png has changed
Binary file res/drawable/status_idle.png has changed
Binary file res/drawable/status_invisible.png has changed
Binary file res/drawable/status_new_message.png has changed
Binary file res/drawable/status_offline.png has changed
Binary file res/drawable/status_requested.png has changed
Binary file res/drawable/status_typing.png has changed
--- a/res/layout/contactlist.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/layout/contactlist.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -4,12 +4,24 @@
 	android:orientation="vertical">
 
 	<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
-		android:id="@+id/contactlist_banner" android:layout_width="fill_parent"
-		android:layout_height="wrap_content" android:spacing="50px" />
+		android:id="@+id/contactlist_banner"
+		android:layout_width="fill_parent"
+		android:layout_height="42px"
+		android:spacing="42px"
+		android:unselectedAlpha="0.4"
+		android:background="#222222" />
+		
+	<View android:layout_width="fill_parent"
+		android:layout_height="2dp"
+		android:fadingEdge="horizontal"
+		android:background="#555555" />
 
 	<LinearLayout android:layout_width="fill_parent"
-		android:layout_height="fill_parent" android:orientation="horizontal">
-		<ListView android:id="@+id/contactlist" android:layout_width="fill_parent"
+		android:layout_height="fill_parent"
+		android:orientation="horizontal"
+		android:padding="2px">
+		<ListView android:id="@+id/contactlist"
+			android:layout_width="fill_parent"
 			android:layout_height="fill_parent" />
 	</LinearLayout>
 
--- a/res/layout/contactlistcontact.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/layout/contactlistcontact.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -1,12 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 	android:orientation="horizontal" android:layout_width="fill_parent"
-	android:layout_height="wrap_content" android:paddingLeft="10px"
-	android:paddingRight="10px" android:gravity="center_vertical">
+	android:layout_height="wrap_content"
+	android:paddingLeft="10px"
+	android:paddingRight="10px"
+	android:paddingTop="4px"
+	android:paddingBottom="4px"
+	android:gravity="center_vertical">
 
 	<ImageView android:id="@+id/contactliststatus"
 		android:adjustViewBounds="true" android:maxWidth="15dip"
-		android:maxHeight="15dip" android:layout_width="wrap_content"
+		android:maxHeight="12px" android:layout_width="wrap_content"
 		android:layout_height="wrap_content" android:gravity="center_vertical" />
 
 	<LinearLayout android:orientation="vertical"
@@ -14,17 +18,11 @@
 		android:layout_height="wrap_content">
 		<TextView android:id="@+id/contactlistpseudo"
 			android:layout_width="fill_parent" android:layout_height="wrap_content"
-			android:paddingLeft="20sp" android:singleLine="true"
+			android:paddingLeft="16px" android:singleLine="true"
 			android:maxLines="1" />
 		<TextView android:id="@+id/contactlistmsgperso"
 			android:layout_width="fill_parent" android:layout_height="wrap_content"
-			android:paddingLeft="20sp" android:singleLine="true"
+			android:paddingLeft="16px" android:singleLine="true"
 			android:maxLines="1" android:linksClickable="false" android:autoLink="all" />
 	</LinearLayout>
-
-	<ImageView android:id="@+id/contactlistavatar"
-		android:adjustViewBounds="true" android:maxWidth="50dip"
-		android:maxHeight="50dip" android:padding="1dip" android:layout_width="wrap_content"
-		android:layout_height="wrap_content" android:gravity="center_vertical" />
-
-</LinearLayout> 
\ No newline at end of file
+</LinearLayout>
--- a/res/layout/group_list.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/layout/group_list.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -8,6 +8,8 @@
 		android:stackFromBottom="true" android:transcriptMode="normal" />
 
 	<EditText android:id="@+id/GroupListText"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
+		android:layout_width="fill_parent"
+		android:layout_height="wrap_content"
+		android:maxLength="20"
 		android:singleLine="true" />
 </LinearLayout>
\ No newline at end of file
--- a/res/layout/login.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/layout/login.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -2,9 +2,11 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 	android:orientation="vertical" android:layout_width="fill_parent"
 	android:layout_height="fill_parent">
+	
 	<ImageView android:id="@+id/log_as_logo" android:src="@drawable/logo"
 		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		android:layout_marginBottom="25px" android:layout_marginTop="15px" />
+		android:layout_marginBottom="25px" android:layout_marginTop="42px" />
+		
 	<TextView android:id="@+id/log_as_msg" android:layout_width="fill_parent"
 		android:layout_height="wrap_content" android:gravity="center"
 		android:textColor="#FF0000" />
--- a/res/layout/sendim.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/layout/sendim.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -4,41 +4,46 @@
 	android:layout_height="fill_parent">
 	<LinearLayout android:orientation="horizontal"
 		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		android:gravity="center_vertical">
+		android:gravity="center_vertical"
+		android:background="#222222"
+		android:padding="4px">
 
-		<ImageView android:id="@+id/sendimavatar" android:src="@drawable/avatar"
-			android:adjustViewBounds="true" android:maxWidth="70dip"
-			android:maxHeight="70dip" android:padding="10dip"
-			android:layout_width="wrap_content" android:layout_height="wrap_content" />
+		<ImageView android:id="@+id/sendimstatus"
+			android:adjustViewBounds="true" android:maxWidth="15dip"
+			android:maxHeight="12px" android:layout_width="wrap_content"
+			android:layout_height="wrap_content" android:gravity="center_vertical" />
 
 		<LinearLayout android:orientation="vertical"
 			android:layout_width="fill_parent" android:layout_height="wrap_content">
 			<TextView android:id="@+id/sendimlogin"
 				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:lines="1" android:paddingLeft="10sp" />
-			<TextView android:id="@+id/sendimchatstate"
+				android:lines="1" android:singleLine="true" android:paddingLeft="15sp"
+				android:textSize="14sp" android:textStyle="bold" android:textColor="#FFFFFF" />
+			<TextView android:id="@+id/sendimstatusmsg"
 				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:lines="1" android:scrollHorizontally="true"
-				android:paddingLeft="15sp" />
-			<TextView android:id="@+id/sendimstatus"
-				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:lines="1" android:scrollHorizontally="true"
+				android:lines="1" android:singleLine="true" android:scrollHorizontally="true"
 				android:hint="@string/SendIMNoStatusSet" android:paddingLeft="15sp"
-				android:autoLink="all" />
+				android:autoLink="all" android:textSize="12sp" android:textColor="#FFFFFF" />
 		</LinearLayout>
 	</LinearLayout>
 
+	<View android:layout_width="fill_parent"
+		android:layout_height="2dp"
+		android:fadingEdge="horizontal"
+		android:background="#555555" />
+
 	<ScrollView android:id="@+id/sendimscroll"
 		android:layout_width="fill_parent" android:layout_height="fill_parent"
 		android:scrollbarTrackVertical="@drawable/scrollbar_vertical_track"
 		android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb"
-		android:scrollbarSize="12dip" android:layout_weight="1">
+		android:scrollbarSize="12dip"
+		android:layout_weight="1"
+		android:layout_marginBottom="6sp"
+		android:padding="4px">
 
-		<TextView android:id="@+id/sendimlist" android:paddingLeft="10px"
-			android:paddingRight="10px" android:paddingTop="10px"
+		<TextView android:id="@+id/sendimlist" android:padding="8sp"
 			android:layout_width="fill_parent" android:layout_height="fill_parent"
 			android:textColor="@color/white"
-			android:background="@color/black"
 			android:singleLine="false" />
 
 	</ScrollView>
--- a/res/menu/contact_list.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/menu/contact_list.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -1,8 +1,10 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
 	<item android:id="@+id/contact_list_menu_add_contact"
 		android:visible="true"
-		android:title="@string/contact_list_menu_add_contact" />
+		android:title="@string/contact_list_menu_add_contact"
+		android:icon="@drawable/ic_menu_add" />
 	<item android:id="@+id/contact_list_menu_settings"
 		android:visible="true"
-		android:title="@string/contact_list_menu_settings" />
+		android:title="@string/contact_list_menu_settings"
+		android:icon="@drawable/ic_menu_manage" />
 </menu>
--- a/res/menu/edit_settings.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/menu/edit_settings.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -1,8 +1,10 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
 	<item android:id="@+id/settings_menu_create_account"
 		android:visible="true"
+		android:icon="@drawable/ic_menu_invite"
 		android:title="@string/settings_menu_create_account" />
 	<item android:id="@+id/settings_menu_login"
 		android:visible="true"
-		android:title="@string/settings_menu_login" />
+		android:title="@string/settings_menu_login"
+		android:icon="@drawable/ic_menu_login" />
 </menu>
--- a/res/menu/login.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/menu/login.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -1,8 +1,10 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
 	<item android:id="@+id/login_menu_settings"
 		android:visible="true"
-		android:title="@string/login_menu_settings" />
+		android:title="@string/login_menu_settings"
+		android:icon="@drawable/ic_menu_manage" />
 	<item android:id="@+id/login_menu_about"
 		android:visible="true"
-		android:title="@string/login_menu_about" />
+		android:title="@string/login_menu_about"
+		android:icon="@drawable/ic_menu_help" />
 </menu>
--- a/res/menu/sendimmenu.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/menu/sendimmenu.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -1,4 +1,7 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
-	<item android:title="Insert a smiley" android:id="@+id/sendim_smiley"/>
-<item android:title="Call" android:id="@+id/sendim_call"></item>
+	<item android:title="Insert a smiley"
+		android:id="@+id/sendim_smiley"
+		android:icon="@drawable/ic_menu_emoticons" />
+	<item android:title="Call" android:id="@+id/sendim_call"
+		android:icon="@drawable/ic_menu_call" />
 </menu>
--- a/res/values-fr/arrays.xml	Fri Oct 16 17:21:42 2009 +0200
+++ b/res/values-fr/arrays.xml	Fri Oct 16 17:22:19 2009 +0200
@@ -6,11 +6,11 @@
 		<item>SOCKS5</item>
 	</string-array>
 	<string-array name="status_types">
-		<item>Disponnible pour discuter</item>
-		<item>Disponnible</item>
+		<item>Disponible pour discuter</item>
+		<item>Disponible</item>
 		<item>Occupé</item>
 		<item>Absent</item>
-		<item>Indisponnible</item>
+		<item>Indisponible</item>
 		<item>Déconnecté</item>
 	</string-array>
 </resources>
--- a/src/com/beem/project/beem/ui/ContactList.java	Fri Oct 16 17:21:42 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactList.java	Fri Oct 16 17:22:19 2009 +0200
@@ -16,6 +16,8 @@
 import android.content.IntentFilter;
 import android.content.ServiceConnection;
 import android.graphics.BitmapFactory;
+import android.graphics.Color;
+import android.graphics.Typeface;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.os.Handler;
@@ -530,62 +532,46 @@
 		Drawable imageDrawable = null;
 		switch (curContact.getStatus()) {
 		    case Status.CONTACT_STATUS_AVAILABLE:
-			imageDrawable = getResources().getDrawable(R.drawable.online);
-			v.setTextColor(getResources().getColor(R.color.white));
+			imageDrawable = getResources().getDrawable(R.drawable.status_available);
 			break;
 		    case Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT:
-			imageDrawable = getResources().getDrawable(R.drawable.chat);
+			imageDrawable = getResources().getDrawable(R.drawable.status_available);
 			break;
 		    case Status.CONTACT_STATUS_AWAY:
-			imageDrawable = getResources().getDrawable(R.drawable.away);
+			imageDrawable = getResources().getDrawable(R.drawable.status_away);
 			break;
 		    case Status.CONTACT_STATUS_BUSY:
-			imageDrawable = getResources().getDrawable(R.drawable.dnd);
+			imageDrawable = getResources().getDrawable(R.drawable.status_dnd);
 			break;
 		    case Status.CONTACT_STATUS_DISCONNECT:
-			imageDrawable = getResources().getDrawable(R.drawable.offline);
+			imageDrawable = getResources().getDrawable(R.drawable.status_offline);
 			break;
 		    case Status.CONTACT_STATUS_UNAVAILABLE:
-			imageDrawable = getResources().getDrawable(R.drawable.requested);
+			imageDrawable = getResources().getDrawable(R.drawable.status_requested);
 			break;
 		    default:
-			imageDrawable = getResources().getDrawable(R.drawable.error);
+			imageDrawable = getResources().getDrawable(R.drawable.status_error);
 			break;
 		}
 		imgV.setImageDrawable(imageDrawable);
 
 		String mContactName = curContact.getName();
-		if ("".equals(mContactName)) {
+		if (mContactName == null || "".equals(mContactName)) {
 		    mContactName = curContact.getJID();
 		    mContactName = StringUtils.parseName(mContactName);
 		    if ("".equals(mContactName))
 			mContactName = curContact.getJID();
 		}
 		v.setText(mContactName);
+		v.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
+		v.setTextColor(Color.WHITE);
+		v.setTextSize(14);
 
 		v = (TextView) view.findViewById(R.id.contactlistmsgperso);
 		if (v != null) {
 		    v.setText(curContact.getMsgState());
-		}
-
-		/*
-		 * Rajouter l'avatar du contact getAvatar() dans la classe imgV = (ImageView)
-		 * view.findViewById(R.id.contactlistavatar); if (imgV != null) { imageDrawable =
-		 * getResources().getDrawable(R.drawable.avatar); imgV.setImageDrawable(imageDrawable); }
-		 */
-
-		if (false) {
-		    imgV = (ImageView) view.findViewById(R.id.contactlistavatar);
-
-		    byte[] rawImg;
-		    try {
-			// TODO: le faire en asynchrone, car la ca bloque tout.
-			rawImg = mXmppFacade.getVcardAvatar(curContact.getJID());
-			if (rawImg != null)
-			    imgV.setImageBitmap(BitmapFactory.decodeByteArray(rawImg, 0, rawImg.length));
-		    } catch (RemoteException e) {
-			e.printStackTrace();
-		    }
+		    v.setTextColor(Color.WHITE);
+		    v.setTextSize(12);
 		}
 	    }
 	}
@@ -636,6 +622,9 @@
 	public View getView(int position, View convertView, ViewGroup parent) {
 	    TextView i = new TextView(mContext);
 	    i.setText(mListGroup.get(position));
+	    i.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
+	    i.setTextColor(Color.WHITE);
+	    i.setHighlightColor(Color.RED);
 	    return i;
 	}
 
--- a/src/com/beem/project/beem/ui/SendIM.java	Fri Oct 16 17:21:42 2009 +0200
+++ b/src/com/beem/project/beem/ui/SendIM.java	Fri Oct 16 17:22:19 2009 +0200
@@ -42,6 +42,7 @@
 import com.beem.project.beem.service.aidl.IRoster;
 import com.beem.project.beem.service.aidl.IXmppFacade;
 import com.beem.project.beem.utils.BeemBroadcastReceiver;
+import com.beem.project.beem.utils.Status;
 
 /**
  * This activity class provides the view for instant messaging after selecting a correspondant.
@@ -50,7 +51,6 @@
 
 public class SendIM extends Activity implements OnClickListener, OnKeyListener {
 
-    private static final int STATUS_TXT_SIZE = 12;
     private static final String TAG = "SEND_IM";
     private static final Intent SERVICE_INTENT = new Intent();
     static {
@@ -63,6 +63,7 @@
     private SharedPreferences mSet;
     private Handler mHandler;
     private Contact mContact;
+    private ImageView mStatusIcon;
     private String mContactName;
     private IChatManager mChatManager;
     private IChatManagerListener mChatManagerListener;
@@ -70,7 +71,6 @@
     private IChat mChat;
     private TextView mText;
     private TextView mLogin;
-    private TextView mChatState;
     private ScrollView mScrolling;
     private char mSpeak;
 
@@ -110,8 +110,8 @@
 	mSmyDialog = new SendIMDialogSmiley(this, mSet);
 	mToSend.setOnClickListener(this);
 	mToSend.setOnKeyListener(this);
+	mStatusIcon = (ImageView) findViewById(R.id.sendimstatus);
 	mLogin = (TextView) findViewById(R.id.sendimlogin);
-	mChatState = (TextView) findViewById(R.id.sendimchatstate);
 	try {
 	    mContact = new Contact(getIntent().getData());
 	    if (mRoster != null)
@@ -122,30 +122,11 @@
 	}
 	mText = (TextView) findViewById(R.id.sendimlist);
 	mScrolling = (ScrollView) findViewById(R.id.sendimscroll);
-	mStatusText = (TextView) findViewById(R.id.sendimstatus);
-	setViewHeader();
+	mStatusText = (TextView) findViewById(R.id.sendimstatusmsg);
 	mReceiver = new BeemBroadcastReceiver(mServConn);
     }
 
     /**
-     * Set the header information in the window.
-     */
-    private void setViewHeader() {
-	Drawable avatar = getResources().getDrawable(R.drawable.avatar);
-	ImageView imgV = (ImageView) findViewById(R.id.sendimavatar);
-	imgV.setImageDrawable(avatar);
-	mStatusText.setTextSize(STATUS_TXT_SIZE);
-	mContactName = mContact.getName();
-	if (mContactName == null || "".equals(mContactName)) {
-	    mContactName = mContact.getJID();
-	    mContactName = StringUtils.parseName(mContactName);
-	    if ("".equals(mContactName))
-		mContactName = mContact.getJID();
-	}
-	mLogin.setText(mContactName);
-    }
-
-    /**
      * {@inheritDoc}
      */
     @Override
@@ -174,6 +155,38 @@
     }
 
     /**
+     * Update the status icon of our contact.
+     */
+    protected void updateStatusIcon() {
+	Drawable statusIcon = null;
+	switch (mContact.getStatus()) {
+	    case Status.CONTACT_STATUS_AVAILABLE:
+		statusIcon = getResources().getDrawable(R.drawable.status_available);
+		break;
+	    case Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT:
+		statusIcon = getResources().getDrawable(R.drawable.status_available);
+		break;
+	    case Status.CONTACT_STATUS_AWAY:
+		statusIcon = getResources().getDrawable(R.drawable.status_away);
+		break;
+	    case Status.CONTACT_STATUS_BUSY:
+		statusIcon = getResources().getDrawable(R.drawable.status_dnd);
+		break;
+	    case Status.CONTACT_STATUS_DISCONNECT:
+		statusIcon = getResources().getDrawable(R.drawable.status_offline);
+		break;
+	    case Status.CONTACT_STATUS_UNAVAILABLE:
+		statusIcon = getResources().getDrawable(R.drawable.status_requested);
+		break;
+	    default:
+		statusIcon = getResources().getDrawable(R.drawable.status_error);
+		break;
+	}
+	Log.d("SENDIM -- UPDATE STATUS ICON", "Contact current status: " + mContact.getStatus() + "");
+	mStatusIcon.setImageDrawable(statusIcon);
+    }
+
+    /**
      * {@inheritDoc}
      */
     @Override
@@ -205,7 +218,6 @@
 	    // TODO Auto-generated catch block
 	    e.printStackTrace();
 	}
-	setViewHeader();
     }
 
     /**
@@ -275,7 +287,6 @@
 	    // TODO Auto-generated catch block
 	    e.printStackTrace();
 	}
-	setViewHeader();
     }
 
     /**
@@ -305,7 +316,16 @@
 		    if (mRoster.getContact(mContact.getJID()) != null) {
 			mContact = mRoster.getContact(mContact.getJID());
 			mStatusText.setText(mContact.getMsgState());
+			String contactName = mContact.getName();
+			if (contactName == null || "".equals(contactName)) {
+			    contactName = mContact.getJID();
+			    contactName = StringUtils.parseName(contactName);
+			    if ("".equals(contactName))
+				contactName = mContact.getJID();
+			}
+			mLogin.setText(contactName);
 		    }
+		    updateStatusIcon();
 		}
 		switchChat(mContact);
 	    } catch (RemoteException e) {
@@ -452,6 +472,8 @@
 	public void onPresenceChanged(PresenceAdapter presence) throws RemoteException {
 	    if (mContact.getJID().equals(StringUtils.parseBareAddress(presence.getFrom()))) {
 		mContact.setStatus(mRoster.getPresence(StringUtils.parseBareAddress(presence.getFrom())));
+		Log.d("SENDIM -- onPresenceChanged", "Contact current status: " + mContact.getStatus() + "");
+		updateStatusIcon();
 		mHandler.post(new RunnableChange());
 	    }
 	}
@@ -525,13 +547,11 @@
 	public void stateChanged(IChat chat) throws RemoteException {
 	    if (chat != mChat)
 		return;
-	    final String state = chat.getState();
 	    Log.d("ChatState", "Action du correspondant : <--- " + chat.getState() + " --->");
 	    mHandler.post(new Runnable() {
 
 		@Override
 		public void run() {
-		    mChatState.setText(state);
 		}
 	    });
 	}