# HG changeset patch
# User marseille@KungFuh
# Date 1238525166 -7200
# Node ID 743ccc7961dca597a291c0ff0ff1bc3475b690eb
# Parent d5a36d8206459697126cf545188c5d60b968b40d
Contact liste recuperer.
Cest pas encore au top!
diff -r d5a36d820645 -r 743ccc7961dc res/layout/contactlist.xml
--- a/res/layout/contactlist.xml Tue Mar 31 22:21:42 2009 +0200
+++ b/res/layout/contactlist.xml Tue Mar 31 20:46:06 2009 +0200
@@ -1,19 +1,16 @@
-
-
-
-
-
-
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+
+
+
+
+
+
\ No newline at end of file
diff -r d5a36d820645 -r 743ccc7961dc res/layout/contactlistcontact.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/res/layout/contactlistcontact.xml Tue Mar 31 20:46:06 2009 +0200
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r d5a36d820645 -r 743ccc7961dc res/layout/contactlistgroup.xml
--- a/res/layout/contactlistgroup.xml Tue Mar 31 22:21:42 2009 +0200
+++ b/res/layout/contactlistgroup.xml Tue Mar 31 20:46:06 2009 +0200
@@ -1,16 +1,18 @@
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="50sp"
+ android:paddingTop="5sp"
+ android:gravity="center_vertical">
-
+
-
+
+
+
\ No newline at end of file
diff -r d5a36d820645 -r 743ccc7961dc src/com/beem/project/beem/BeemApplication.java
--- a/src/com/beem/project/beem/BeemApplication.java Tue Mar 31 22:21:42 2009 +0200
+++ b/src/com/beem/project/beem/BeemApplication.java Tue Mar 31 20:46:06 2009 +0200
@@ -31,6 +31,7 @@
private Resources mPrivateResources;
private static BeemApplication mBeemApp;
private List mQueue = new LinkedList();
+ private boolean mIsConnected;
public static BeemApplication getApplication(Activity activity) {
if (mBeemApp == null) {
@@ -68,12 +69,13 @@
}
public synchronized void startBeemService() {
- if (mFacade == null) {
+ if (!mIsConnected) {
// Intent intent = new Intent(this, BeemService.class);
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
mApplicationContext.startService(intent);
mApplicationContext.bindService(intent, mServConn, BIND_AUTO_CREATE);
+ mIsConnected = true;
}
}
@@ -82,7 +84,7 @@
@Override
public void onServiceDisconnected(ComponentName name) {
mFacade = null;
-
+ mIsConnected = false;
}
@Override
@@ -110,7 +112,7 @@
public void callWhenServiceConnected(Handler target, Runnable callback) {
Message msg = Message.obtain(target, callback);
- if (mFacade != null) {
+ if (!mIsConnected) {
msg.sendToTarget();
} else {
startBeemService();
diff -r d5a36d820645 -r 743ccc7961dc src/com/beem/project/beem/ui/ContactList.java
--- a/src/com/beem/project/beem/ui/ContactList.java Tue Mar 31 22:21:42 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactList.java Tue Mar 31 20:46:06 2009 +0200
@@ -6,145 +6,161 @@
import java.util.Map;
import android.app.ExpandableListActivity;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.content.ServiceConnection;
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.graphics.drawable.Drawable;
import android.os.Bundle;
-import android.os.IBinder;
+import android.os.Handler;
import android.os.RemoteException;
import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
import android.widget.ExpandableListAdapter;
+import android.widget.ImageView;
import android.widget.SimpleExpandableListAdapter;
+import android.widget.TextView;
import com.beem.project.beem.BeemApplication;
-import com.beem.project.beem.BeemService;
import com.beem.project.beem.R;
import com.beem.project.beem.service.Contact;
-import com.beem.project.beem.service.aidl.IBeemConnectionListener;
-import com.beem.project.beem.service.aidl.IRoster;
-import com.beem.project.beem.service.aidl.IXMPPConnection;
import com.beem.project.beem.service.aidl.IXMPPFacade;
public class ContactList extends ExpandableListActivity {
- private static final String TAG = "CONTACTLIST_ACT";
-
- private IXMPPFacade mService = null;
-
- private BeemApplication mBeemApplication;
-
- @Override
- public void onCreate(Bundle saveBundle) {
- super.onCreate(saveBundle);
- mBeemApplication = BeemApplication.getApplication(this);
- mBeemApplication.startBeemService();
- mService = mBeemApplication.getXmppFacade();
- /* bindService(new Intent(this, BeemService.class), mConnection,
- BIND_AUTO_CREATE | BIND_DEBUG_UNBIND); */
- showContactList();
- }
-
- private void showContactList() {
- ExpandableListAdapter Adapter;
-
- List