plein de retouche ui
authorPhilippe Lago <lago_p@epitech.net>
Thu, 23 Apr 2009 22:19:41 +0200
changeset 152 f14b3fcf65c8
parent 151 e47398897afe (current diff)
parent 149 2faf7174aa03 (diff)
child 153 b9223cf6f3be
plein de retouche ui
res/drawable/chat.png
res/drawable/connecting.png
res/drawable/error.png
res/drawable/message.png
res/drawable/requested.png
res/layout/sendim.xml
res/menu/contactlistmenu.xml
src/com/beem/project/beem/ui/ChangeStatus.java
--- a/AndroidManifest.xml	Thu Apr 23 18:10:03 2009 +0200
+++ b/AndroidManifest.xml	Thu Apr 23 22:19:41 2009 +0200
@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 	package="com.beem.project.beem" android:versionCode="1"
 	android:versionName="1.0">
-	<application android:label="@string/app_name" android:name="BeemApplication" android:theme="@style/customtheme.contactList" android:icon="@drawable/signal">
+	<application android:label="@string/app_name" android:name="BeemApplication" android:icon="@drawable/signal">
 		<activity android:name=".ui.ContactList" android:label="@string/app_name">
 			<intent-filter>
 				<action android:name="android.intent.action.MAIN" />
Binary file res/drawable/barthe_f.jpg has changed
Binary file res/drawable/chat.png has changed
Binary file res/drawable/connecting.png has changed
Binary file res/drawable/error.png has changed
Binary file res/drawable/message.png has changed
Binary file res/drawable/requested.png has changed
--- a/res/layout/contactlistsettings.xml	Thu Apr 23 18:10:03 2009 +0200
+++ b/res/layout/contactlistsettings.xml	Thu Apr 23 22:19:41 2009 +0200
@@ -106,6 +106,11 @@
 		android:text="OK">
 		<requestFocus />
 	</Button>
+		<Button android:id="@+id/reconnect" android:layout_width="wrap_content"
+		android:layout_height="wrap_content" android:layout_gravity="center_horizontal"
+		android:text="Reconnect">
+		<requestFocus />
+	</Button>
 
 </LinearLayout>
 </ScrollView>
\ No newline at end of file
--- a/res/layout/sendim.xml	Thu Apr 23 18:10:03 2009 +0200
+++ b/res/layout/sendim.xml	Thu Apr 23 22:19:41 2009 +0200
@@ -7,31 +7,35 @@
         android:orientation="horizontal"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:paddingLeft="10px"
-        android:paddingRight="10px"
         android:background="@drawable/beem_sendim_header_1"
         android:gravity="center_vertical" >
 
-        <ImageView android:id="@+id/sendimavatar"
-        	android:layout_weight="5"
-        	android:layout_width="fill_parent"
+        <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"
-            android:gravity="center_vertical" />
+             />
 
 		<LinearLayout
 			android:orientation="vertical"
-			android:layout_weight="1"
         	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:paddingLeft="20sp" />
+            	android:paddingLeft="10sp" />
 			<TextView android:id="@+id/sendimstatus"
 				android:layout_width="fill_parent"
             	android:layout_height="wrap_content"
+            	android:lines="1"
+            	android:scrollHorizontally="true"
             	android:hint="@string/SendIMNoStatusSet"
-            	android:paddingLeft="20sp" />
+            	android:paddingLeft="15sp" />
 		</LinearLayout>
 </LinearLayout>
 
@@ -76,6 +80,9 @@
 		android:layout_width="fill_parent"
 		android:layout_height="fill_parent"
 		android:background="@drawable/beem_sendim_textview"
+		android:scrollbarTrackVertical="@drawable/scrollbar_vertical_track"
+	    android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb"
+	    android:scrollbarSize="12dip"
 		android:layout_weight="1">
 		
 		<TextView android:id="@+id/sendimlist"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/res/layout/subscription.xml	Thu Apr 23 22:19:41 2009 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+   	<LinearLayout
+   		android:orientation="horizontal"
+   		android:layout_width="fill_parent"
+   		android:layout_height="wrap_content">
+   		
+	   	<Button android:id="@+id/SubscriptionAccept"
+	   		android:layout_width="fill_parent"
+	   		android:layout_height="fill_parent"
+	   		android:layout_weight="1"
+	   		android:text="@string/AcceptButton"/>
+	   		
+		<Button android:id="@+id/SubscriptionRefuse"
+	   		android:layout_width="fill_parent"
+	   		android:layout_height="fill_parent"
+	   		android:layout_weight="1"
+	   		android:text="@string/RefuseButton"/>
+   	</LinearLayout>
+</LinearLayout>
\ No newline at end of file
--- a/res/menu/contactlistmenu.xml	Thu Apr 23 18:10:03 2009 +0200
+++ b/res/menu/contactlistmenu.xml	Thu Apr 23 22:19:41 2009 +0200
@@ -1,6 +1,6 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
-	<item android:title="Creer ou Editer un compte" android:id="@+id/account_edit" android:icon="@drawable/xmpp"/>
+	<item android:title="@string/MenuConnection" android:id="@+id/account_edit" android:icon="@drawable/xmpp"/>
 	<item android:title="@string/MenuAddContact" android:id="@+id/add_contact" android:icon="@drawable/buddie_robot"/>
-	<item android:title="L'equipe Beem" android:id="@+id/account_about"/>
-	<item android:title="TEMP/createAccount" android:id="@+id/account_create"/>
+	<item android:title="@string/MenuAccountAbout" android:id="@+id/account_about"/>
+	<item android:title="@string/MenuAccountCreate" android:id="@+id/account_create"/>
 </menu>
--- a/res/values/strings.xml	Thu Apr 23 18:10:03 2009 +0200
+++ b/res/values/strings.xml	Thu Apr 23 22:19:41 2009 +0200
@@ -3,6 +3,8 @@
 	<string name="app_name">Beem</string>
 	<string name="OkButton">Ok</string>
 	<string name="ClearButton">Clear</string>
+	<string name="AcceptButton">Accept</string>
+	<string name="RefuseButton">Refuse</string>
 	
 	<!--  Beem class -->
 	
@@ -55,8 +57,12 @@
 	<string name="ChangeStatusText">Type here your status message :</string>
 
 	<string name="MenuAddContact">Add new contact</string>
+	<string name="MenuAccountAbout">Beem Project</string>
+	<string name="MenuAccountCreate">Create account</string>
+	<string name="MenuConnection">Edit account</string>
 
 	<string name="ChangeStatusOk">Updating status</string>
 	<string name="ChangeStatusNoChange">Nothing to change</string>
 
+
 </resources>
--- a/res/values/style.xml	Thu Apr 23 18:10:03 2009 +0200
+++ b/res/values/style.xml	Thu Apr 23 22:19:41 2009 +0200
@@ -1,31 +1,31 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-  <style name="customtheme" parent="android:Theme">
- </style>
- 
-  	<style name="customtheme.contactList"> 
-    <item name="android:windowBackground">@drawable/background</item>
-    <item name="android:windowNoTitle">true</item>
-    <item name="android:textColor">#000000</item>
-    <item name="android:typeface">sans</item>
-    <item name="android:textSize">18sp</item>
+	<style name="customtheme" parent="android:Theme">
+	</style>
+
+	<style name="customtheme.contactList">
+		<item name="android:windowBackground">@drawable/background</item>
+		<item name="android:windowNoTitle">true</item>
+		<item name="android:textColor">#000000</item>
+		<item name="android:typeface">sans</item>
+		<item name="android:textSize">18sp</item>
+
+	</style>
 
-  </style>
-  
-  	<style name="customtheme.jungle">
-  	<item name="android:windowBackground">@drawable/background</item>
-    <item name="android:windowNoTitle">true</item>
-    <item name="android:textColor">#FFFFFF</item>
-    <item name="android:typeface">sans</item>
-    <item name="android:textSize">18sp</item>
-    </style>
-  	
-  	<style name="customtheme.spinner">
-  	<item name="android:windowBackground">@drawable/background</item>
-    <item name="android:windowNoTitle">true</item>
-    <item name="android:textColor">#FF0000</item>
-    <item name="android:typeface">sans</item>
-    <item name="android:textSize">18sp</item>
-    </style>
-    
+	<style name="customtheme.jungle">
+		<item name="android:windowBackground">@drawable/background</item>
+		<item name="android:windowNoTitle">true</item>
+		<item name="android:textColor">#FFFFFF</item>
+		<item name="android:typeface">sans</item>
+		<item name="android:textSize">18sp</item>
+	</style>
+
+	<style name="customtheme.spinner">
+		<item name="android:windowBackground">@drawable/background</item>
+		<item name="android:windowNoTitle">true</item>
+		<item name="android:textColor">#FF0000</item>
+		<item name="android:typeface">sans</item>
+		<item name="android:textSize">18sp</item>
+	</style>
+
 </resources>
\ No newline at end of file
--- a/src/com/beem/project/beem/BeemApplication.java	Thu Apr 23 18:10:03 2009 +0200
+++ b/src/com/beem/project/beem/BeemApplication.java	Thu Apr 23 22:19:41 2009 +0200
@@ -98,7 +98,7 @@
 	mBeemApp.mActivity = activity;
 	mBeemApp.mProgressDialog = new ProgressDialog(activity);
 	mBeemApp.mProgressDialog.setTitle("Beem");
-	mBeemApp.mProgressDialog.setIcon(R.drawable.signal);
+	mBeemApp.mProgressDialog.setIcon(R.drawable.barthe_f);
 	mBeemApp.mProgressDialog.setMessage("Connecting...");
 	mBeemApp.mApplicationContext = activity.getApplication();
 	mBeemApp.mPrivateResources = activity.getResources();
--- a/src/com/beem/project/beem/BeemService.java	Thu Apr 23 18:10:03 2009 +0200
+++ b/src/com/beem/project/beem/BeemService.java	Thu Apr 23 22:19:41 2009 +0200
@@ -14,6 +14,7 @@
 import org.jivesoftware.smack.proxy.ProxyInfo.ProxyType;
 import android.app.Notification;
 import android.app.NotificationManager;
+import android.app.PendingIntent;
 import android.app.Service;
 import android.content.Intent;
 import android.content.SharedPreferences;
@@ -26,6 +27,8 @@
 import com.beem.project.beem.service.aidl.IBeemConnectionListener;
 import com.beem.project.beem.service.aidl.IXmppConnection;
 import com.beem.project.beem.service.aidl.IXmppFacade;
+import com.beem.project.beem.ui.SendIM;
+import com.beem.project.beem.ui.Subscription;
 
 /**
  * This class is for the Beem service.
@@ -72,14 +75,14 @@
      */
     @Override
     public void onCreate() {
-	
+
 	super.onCreate();
 	mSettings = getSharedPreferences(getString(R.string.PreferenceFileName), MODE_PRIVATE);
 	mLogin = mSettings.getString(getString(R.string.PreferenceLoginKey), "");
 	mPassword = mSettings.getString(getString(R.string.PreferencePasswordKey), "");
 	mHost = mSettings.getString(getString(R.string.PreferenceHostKey), "");
 	// TODO penser a commenter
-	mHost = "10.0.2.2";
+	//mHost = "10.0.2.2";
 	initConnectionConfig();
 	mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
 	mConnection = new XmppConnectionAdapter(mConnectionConfiguration, mLogin, mPassword, this);
@@ -117,7 +120,7 @@
     public void sendNotification(int id, Notification notif) {
 	mNotificationManager.notify(id, notif);
     }
-    
+
     /**
      * Initialise la configuration de la connexion.
      */
@@ -168,7 +171,7 @@
 			@Override
 			public void processPacket(Packet packet) {
 			    // TODO Auto-generated method stub
-			    Log.i("TEST", "Une demande recue");
+			    Log.d("TEST", "Une demande recue");
 			}
 		    }, filter);
 		}
@@ -185,7 +188,7 @@
 
 		}
 
-		
+
 		@Override
 		public void onConnect() throws RemoteException {
 		    // TODO Auto-generated method stub
@@ -205,8 +208,17 @@
 
 			@Override
 			public void processPacket(Packet packet) {
-			    // TODO Auto-generated method stub
-			    Log.i("TEST", "Une demande recue");
+			    String from = packet.getFrom();
+			    Notification notif = new Notification(com.beem.project.beem.R.drawable.signal, "Demande d'ajout", System
+				.currentTimeMillis());
+			    notif.defaults = Notification.DEFAULT_ALL;
+			    notif.flags = Notification.FLAG_AUTO_CANCEL;
+			    Intent intent = new Intent(BeemService.this, Subscription.class);
+			    intent.putExtra("from", from);
+			    notif.setLatestEventInfo(BeemService.this, from, "demande d'ajout de " + from, PendingIntent.getActivity(BeemService.this, 0,
+				intent, PendingIntent.FLAG_ONE_SHOT));
+			    int id = packet.hashCode();
+			    sendNotification(id, notif);
 			}
 		    }, filter);
 
@@ -228,7 +240,7 @@
 		@Override
 		public void connectionFailed(String errorMsg) throws RemoteException {
 		    // TODO Auto-generated method stub
-		    
+
 		}
 	    });
 	} catch (RemoteException e) {
@@ -245,5 +257,5 @@
 	    mConnection.disconnect();
     }
 
-    
+
 }
--- a/src/com/beem/project/beem/service/BeemChatManager.java	Thu Apr 23 18:10:03 2009 +0200
+++ b/src/com/beem/project/beem/service/BeemChatManager.java	Thu Apr 23 22:19:41 2009 +0200
@@ -15,7 +15,6 @@
 import org.jivesoftware.smackx.ChatState;
 import org.jivesoftware.smackx.ChatStateListener;
 
-import android.R;
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.content.Intent;
--- a/src/com/beem/project/beem/ui/ChangeStatus.java	Thu Apr 23 18:10:03 2009 +0200
+++ b/src/com/beem/project/beem/ui/ChangeStatus.java	Thu Apr 23 22:19:41 2009 +0200
@@ -1,30 +1,25 @@
 package com.beem.project.beem.ui;
 
 import android.app.Activity;
-
+import android.content.Context;
 import android.content.Intent;
-
-import android.content.Context;
 import android.content.SharedPreferences;
 import android.content.SharedPreferences.Editor;
-
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.RemoteException;
+import android.util.Log;
 import android.view.View;
 import android.view.View.OnClickListener;
-import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.Spinner;
 import android.widget.TextView;
 import android.widget.Toast;
-import android.widget.AdapterView.OnItemSelectedListener;
 
 import com.beem.project.beem.BeemApplication;
 import com.beem.project.beem.BeemService;
 import com.beem.project.beem.R;
-
 import com.beem.project.beem.service.aidl.IXmppFacade;
 import com.beem.project.beem.utils.Status;
 
@@ -48,16 +43,19 @@
     private ArrayAdapter<String> mAdapter;
     private Context mContext = this;
     private Toast mToast;
+    private static Integer nb = 0;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
 	super.onCreate(savedInstanceState);
-	setContentView(R.layout.changestatus);
-
+	
+	nb++;
+	Log.i("nb de oncreate changestatus", nb.toString());
 	// Beem Application specific
 	mHandler = new Handler();
 	mBeemApplication = BeemApplication.getApplication(this);
-
+	
+	setContentView(R.layout.changestatus);
 	mStatusText = (TextView) findViewById(R.id.ChangeStatusText);
 	mOk = (Button) findViewById(R.id.ChangeStatusOk);
 	mClear = (Button) findViewById(R.id.ChangeStatusClear);
--- a/src/com/beem/project/beem/ui/ContactList.java	Thu Apr 23 18:10:03 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactList.java	Thu Apr 23 22:19:41 2009 +0200
@@ -8,8 +8,8 @@
 import android.app.ExpandableListActivity;
 import android.content.Context;
 import android.content.Intent;
-import android.content.SharedPreferences;
 import android.graphics.drawable.Drawable;
+import android.net.Uri;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.RemoteException;
@@ -38,23 +38,20 @@
 
     private static final String TAG = "CONTACTLIST_ACT";
     private static final int PREFERENCECHANGED = 0;
-    private static final int CREATEACCOUNT = 1;
+    private static final String CHILD = "CHILD";
+    private static final String GROUP = "GROUP";
     private IXmppFacade mService = null;
-    private SharedPreferences mSettings;
-    private Handler mHandler;
     private BeemApplication mBeemApplication;
     private BeemRosterListener mRosterListener;
     private IRoster mRoster;
 
     @SuppressWarnings("unchecked")
     @Override
-    public boolean onChildClick(ExpandableListView parent, View v,
-	int groupPosition, int childPosition, long id) {
+    public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
+	Map<String, Contact> child = (HashMap<String, Contact>) parent.getExpandableListAdapter().getChild(
+	    groupPosition, childPosition);
 	Intent i = new Intent(this, SendIM.class);
-	Map<String, Contact> child = (HashMap<String, Contact>) parent
-	.getExpandableListAdapter().getChild(groupPosition,
-	    childPosition);
-	i.putExtra("contact", child.get("CHILD"));
+	i.putExtra("contact", child.get(CHILD));
 	startActivity(i);
 	return true;
     }
@@ -62,35 +59,10 @@
     @Override
     protected void onCreate(Bundle saveBundle) {
 	super.onCreate(saveBundle);
-	setTheme(R.style.customtheme_contactList);
-	mHandler = new Handler();
 	mBeemApplication = BeemApplication.getApplication(this);
-	mSettings = getSharedPreferences(
-	    getString(R.string.PreferenceFileName), MODE_PRIVATE);
 	mRosterListener = new BeemRosterListener();
-    }
-
-    @Override
-    protected void onStart() {
-	super.onStart();
-    }
-
-    @Override
-    protected void onDestroy() {
-        // TODO Auto-generated method stub
-        super.onDestroy();
-        mBeemApplication.unbindBeemService();
-    }
-
-    @Override
-    protected void onResume() {
-	super.onResume();
 	mBeemApplication.startBeemService();
-	/*
-	 * @TODO: A ameliorer apres listener de nikita
-	 */
-	Log.i(TAG, "onResume");
-	mBeemApplication.callWhenConnectedToServer(mHandler, new Runnable() {
+	mBeemApplication.callWhenConnectedToServer(new Handler(), new Runnable() {
 	    @Override
 	    public void run() {
 		mService = mBeemApplication.getXmppFacade();
@@ -111,14 +83,20 @@
 	});
     }
 
+    @Override
+    protected void onDestroy() {
+	// TODO Auto-generated method stub
+	super.onDestroy();
+	mBeemApplication.unbindBeemService();
+    }
+
     private void callbackShowContactList() {
 	/*
 	 * @TODO: A ameliorer apres listener de nikita
 	 */
 	if (mRoster != null)
 	    try {
-		showContactList(mRoster.getGroupsNames(), mRoster
-		    .getContactList());
+		showContactList(mRoster.getGroupsNames(), mRoster.getContactList());
 	    } catch (RemoteException e) {
 		e.printStackTrace();
 	    }
@@ -126,9 +104,7 @@
 
     /**
      * Callback for menu creation.
-     * 
-     * @param menu
-     *            the menu created
+     * @param menu the menu created
      * @return true on success, false otherwise
      */
     @Override
@@ -141,9 +117,7 @@
 
     /**
      * Callback for menu item selected.
-     * 
-     * @param item
-     *            the item selected
+     * @param item the item selected
      * @return true on success, false otherwise
      */
     @Override
@@ -153,6 +127,8 @@
 		startActivityForResult(new Intent(this, ContactListSettings.class), PREFERENCECHANGED);
 		return true;
 	    case R.id.account_about:
+		Intent t = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.beem-project.com"));
+		startActivity(t);
 		return true;
 	    case R.id.account_create:
 		startActivity(new Intent(this, AccountCreation.class));
@@ -165,19 +141,23 @@
 	}
     }
 
-    protected void onActivityResult(int requestCode, int resultCode,
-	Intent data) {
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
 	if (requestCode == PREFERENCECHANGED) {
 	    if (resultCode == RESULT_OK) {
 		mBeemApplication.stopBeemService();
 		mBeemApplication.startBeemService();
-	    }            
+	    }
 	}
     }
 
+    private boolean isStatusOK(int status) {
+	if (status == Status.CONTACT_STATUS_AVAILABLE || status == Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT
+	    || status == Status.CONTACT_STATUS_AWAY || status == Status.CONTACT_STATUS_BUSY)
+	    return true;
+	return false;
+    }
 
-    private void showContactList(List<String> listGroup,
-	List<Contact> listContact) {
+    private void showContactList(List<String> listGroup, List<Contact> listContact) {
 	ExpandableListAdapter Adapter;
 	List<Map<String, String>> groupData = new ArrayList<Map<String, String>>();
 	List<List<Map<String, Contact>>> childData = new ArrayList<List<Map<String, Contact>>>();
@@ -192,43 +172,36 @@
 
 	    List<Map<String, Contact>> children = new ArrayList<Map<String, Contact>>();
 	    for (int j = 0; j < listContact.size(); ++j) {
+		Contact c = listContact.get(j);
+		Log.i(TAG, c.getID() + " " + c.getJID());
 		Map<String, Contact> curChildMap = new HashMap<String, Contact>();
 		children.add(curChildMap);
-		Contact c = listContact.get(j);
-		Log.i(TAG, c.getID() + " " + c.getJID());
-		curChildMap.put("CHILD", c);
+		curChildMap.put(CHILD, c);
 	    }
 	    childData.add(children);
 	}
 
-	Adapter = new ContactExpandableListAdapter(this, groupData,
-	    R.layout.contactlistgroup, new String[] { "GROUP" },
-	    new int[] { R.id.textgroup }, childData,
-	    R.layout.contactlistcontact, new String[] { "CHILD" },
-	    new int[] { R.id.contactliststatus, R.id.contactlistpseudo,
-	    R.id.contactlistmsgperso, R.id.contactlistavatar });
+	Adapter = new ContactExpandableListAdapter(this, groupData, R.layout.contactlistgroup,
+	    new String[] { GROUP }, new int[] { R.id.textgroup }, childData, R.layout.contactlistcontact,
+	    new String[] { CHILD }, new int[] { R.id.contactliststatus, R.id.contactlistpseudo,
+		R.id.contactlistmsgperso, R.id.contactlistavatar });
 	setListAdapter(Adapter);
     }
 
     /**
-     * A simple adapter which allows you to bind data to specific Views defined
-     * within the layout of an Expandable Lists children (Implement
-     * getGroupView() to define the layout of parents)
+     * A simple adapter which allows you to bind data to specific Views defined within the layout of an Expandable Lists
+     * children (Implement getGroupView() to define the layout of parents)
      */
-    private class ContactExpandableListAdapter extends
-    SimpleExpandableListAdapter {
+    private class ContactExpandableListAdapter extends SimpleExpandableListAdapter {
 
 	private List<? extends List<? extends Map<String, ?>>> mChildData;
 	private String[] mChildFrom;
 	private int[] mChildTo;
 
-	public ContactExpandableListAdapter(Context context,
-	    List<? extends Map<String, ?>> groupData, int groupLayout,
-		String[] groupFrom, int[] groupTo,
-		List<? extends List<? extends Map<String, ?>>> childData,
-		    int childLayout, String[] childFrom, int[] childTo) {
-	    super(context, groupData, groupLayout, groupFrom, groupTo,
-		childData, childLayout, childFrom, childTo);
+	public ContactExpandableListAdapter(Context context, List<? extends Map<String, ?>> groupData, int groupLayout,
+	    String[] groupFrom, int[] groupTo, List<? extends List<? extends Map<String, ?>>> childData,
+	    int childLayout, String[] childFrom, int[] childTo) {
+	    super(context, groupData, groupLayout, groupFrom, groupTo, childData, childLayout, childFrom, childTo);
 
 	    mChildData = childData;
 	    mChildFrom = childFrom;
@@ -237,8 +210,8 @@
 	}
 
 	@Override
-	public View getChildView(int groupPosition, int childPosition,
-	    boolean isLastChild, View convertView, ViewGroup parent) {
+	public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView,
+	    ViewGroup parent) {
 
 	    View v;
 	    if (convertView == null) {
@@ -246,13 +219,13 @@
 	    } else {
 		v = convertView;
 	    }
-	    bindView(v, mChildData.get(groupPosition).get(childPosition),
-		mChildFrom, mChildTo, groupPosition, childPosition);
+	    bindView(v, mChildData.get(groupPosition).get(childPosition), mChildFrom, mChildTo, groupPosition,
+		childPosition);
 	    return v;
 	}
 
-	private void bindView(View view, Map<String, ?> data, String[] from,
-	    int[] to, int groupPosition, int childPosition) {
+	private void bindView(View view, Map<String, ?> data, String[] from, int[] to, int groupPosition,
+	    int childPosition) {
 	    Contact c = (Contact) data.get(from[0]);
 
 	    if (c != null) {
@@ -261,33 +234,26 @@
 		Drawable imageDrawable = null;
 		switch (c.getStatus()) {
 		    case Status.CONTACT_STATUS_AVAILABLE:
-			imageDrawable = (Drawable) getResources().getDrawable(
-			    R.drawable.online);
+			imageDrawable = (Drawable) getResources().getDrawable(R.drawable.online);
 			break;
 		    case Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT:
-			imageDrawable = (Drawable) getResources().getDrawable(
-			    R.drawable.chat);
+			imageDrawable = (Drawable) getResources().getDrawable(R.drawable.chat);
 			break;
 		    case Status.CONTACT_STATUS_AWAY:
-			imageDrawable = (Drawable) getResources().getDrawable(
-			    R.drawable.away);
+			imageDrawable = (Drawable) getResources().getDrawable(R.drawable.away);
 			break;
 		    case Status.CONTACT_STATUS_BUSY:
-			imageDrawable = (Drawable) getResources().getDrawable(
-			    R.drawable.dnd);
+			imageDrawable = (Drawable) getResources().getDrawable(R.drawable.dnd);
 			break;
 		    case Status.CONTACT_STATUS_DISCONNECT:
-			imageDrawable = (Drawable) getResources().getDrawable(
-			    R.drawable.offline);
+			imageDrawable = (Drawable) getResources().getDrawable(R.drawable.offline);
 			break;
 		    case Status.CONTACT_STATUS_UNAVAILABLE:
-			imageDrawable = (Drawable) getResources().getDrawable(
-			    R.drawable.requested);
+			imageDrawable = (Drawable) getResources().getDrawable(R.drawable.requested);
 			break;
 		    default:
-			imageDrawable = (Drawable) getResources().getDrawable(
-			    R.drawable.error);
-		    break;
+			imageDrawable = (Drawable) getResources().getDrawable(R.drawable.error);
+			break;
 		}
 		imgV.setImageDrawable(imageDrawable);
 
@@ -302,13 +268,11 @@
 		}
 
 		/*
-		 * TODO: Rajouter l'avatar du contact getAvatar() dans la
-		 * classe
+		 * TODO: Rajouter l'avatar du contact getAvatar() dans la classe
 		 */
 		imgV = (ImageView) view.findViewById(to[3]);
 		if (imgV != null) {
-		    imageDrawable = (Drawable) getResources().getDrawable(
-			R.drawable.avatar);
+		    imageDrawable = (Drawable) getResources().getDrawable(R.drawable.avatar);
 		    imgV.setImageDrawable(imageDrawable);
 		}
 	    }
@@ -318,29 +282,25 @@
     private class BeemRosterListener extends IBeemRosterListener.Stub {
 
 	@Override
-	public void onEntriesAdded(List<String> addresses)
-	throws RemoteException {
+	public void onEntriesAdded(List<String> addresses) throws RemoteException {
 	    Log.i(TAG, "ENTRIES ADDED");
 
 	}
 
 	@Override
-	public void onEntriesDeleted(List<String> addresses)
-	throws RemoteException {
+	public void onEntriesDeleted(List<String> addresses) throws RemoteException {
 	    Log.i(TAG, "ENTRIES DEL");
 
 	}
 
 	@Override
-	public void onEntriesUpdated(List<String> addresses)
-	throws RemoteException {
+	public void onEntriesUpdated(List<String> addresses) throws RemoteException {
 	    Log.i(TAG, "ENTRIES UPD");
 
 	}
 
 	@Override
-	public void onPresenceChanged(PresenceAdapter presence)
-	throws RemoteException {
+	public void onPresenceChanged(PresenceAdapter presence) throws RemoteException {
 	    Log.i(TAG, "PRESENCE CHANGED");
 
 	}
--- a/src/com/beem/project/beem/ui/ContactListSettings.java	Thu Apr 23 18:10:03 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactListSettings.java	Thu Apr 23 22:19:41 2009 +0200
@@ -51,6 +51,17 @@
 	showSettings();
 	Button ok = (Button) findViewById(R.id.ok);
 	ok.setOnClickListener(mOkListener);
+	
+	Button reco = (Button) findViewById(R.id.reconnect);
+	reco.setOnClickListener(new OnClickListener () {
+
+	    @Override
+	    public void onClick(View v) {
+		setResult(RESULT_OK);
+		finish();
+	    }
+	    
+	});
     }
 
     private OnItemSelectedListener mProxyType = new OnItemSelectedListener() {
--- a/src/com/beem/project/beem/ui/SendIM.java	Thu Apr 23 18:10:03 2009 +0200
+++ b/src/com/beem/project/beem/ui/SendIM.java	Thu Apr 23 22:19:41 2009 +0200
@@ -64,7 +64,6 @@
     @Override
     public void onCreate(Bundle saveBundle) {
 	super.onCreate(saveBundle);
-	setTheme(R.style.customtheme_contactList);
 	mHandler = new Handler();
 	mChatManagerListener = new OnChatListener();
 	mMessageListener = new OnMessageListener();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/Subscription.java	Thu Apr 23 22:19:41 2009 +0200
@@ -0,0 +1,23 @@
+/**
+ * 
+ */
+package com.beem.project.beem.ui;
+
+import com.beem.project.beem.R;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.Button;
+
+/**
+ * @author nikita
+ *
+ */
+public class Subscription extends Activity {
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+	super.onCreate(savedInstanceState);
+	setContentView(R.layout.subscription);
+	//mOk = (Button) findViewById(R.id.SubscriptionAccept);
+    }
+}