# HG changeset patch # User Philippe Lago # Date 1240586523 -7200 # Node ID 779ac7aefd71ae5fccc24bd210da4cd19e1e8a87 # Parent b8d88affb228b39b316e06dafab9f205a9829e85# Parent 0e59b0a9509b5ed410fa6871e9355e7a2b595063 merge avec marseille diff -r b8d88affb228 -r 779ac7aefd71 res/layout/contactlistcontact.xml --- a/res/layout/contactlistcontact.xml Fri Apr 24 17:20:59 2009 +0200 +++ b/res/layout/contactlistcontact.xml Fri Apr 24 17:22:03 2009 +0200 @@ -5,7 +5,6 @@ android:layout_height="wrap_content" android:paddingLeft="10px" android:paddingRight="10px" - android:background="@drawable/beem_sendim_header_1" android:gravity="center_vertical" > listGroup, List listContact) { - ExpandableListAdapter Adapter; List> groupData = new ArrayList>(); List>> childData = new ArrayList>>(); - - if (listGroup.size() == 0) + int groupSize = listGroup.size(); + if (groupSize == 0) listGroup.add("Default"); for (int i = 0; i < listGroup.size(); i++) { Map curGroupMap = new HashMap(); @@ -182,18 +186,20 @@ List> children = new ArrayList>(); for (int j = 0; j < listContact.size(); ++j) { Contact c = listContact.get(j); - Log.i(TAG, c.getID() + " " + c.getJID()); - Map curChildMap = new HashMap(); - children.add(curChildMap); - curChildMap.put(CHILD, c); + if (groupSize == 0 /* || listGroup.get(i).equals(c.getGroupName()) */) { + Log.i(TAG, c.getID() + " " + c.getJID()); + Map curChildMap = new HashMap(); + children.add(curChildMap); + curChildMap.put(CHILD, c); + } } childData.add(children); } - Adapter = new ContactExpandableListAdapter(this, groupData, R.layout.contactlistgroup, new String[] { GROUP }, + mAdapter = 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); + setListAdapter(mAdapter); } /** diff -r b8d88affb228 -r 779ac7aefd71 src/com/beem/project/beem/ui/ContactListSettings.java --- a/src/com/beem/project/beem/ui/ContactListSettings.java Fri Apr 24 17:20:59 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactListSettings.java Fri Apr 24 17:22:03 2009 +0200 @@ -108,7 +108,7 @@ editor.putString(getString(R.string.PreferencePasswordKey), getWidgetText(R.id.password)); mIsChanged = true; } - if (isChanged(R.id.host, R.string.PreferenceService)) { + if (isChanged(R.id.service, R.string.PreferenceService)) { editor.putString(getString(R.string.PreferenceService), getWidgetText(R.id.service)); mIsChanged = true; } @@ -118,7 +118,7 @@ mIsChanged = true; } if (Integer.parseInt(getWidgetText(R.id.proxy_port)) != mSettings.getInt( - getString(R.string.PreferenceProxyPort), 1080)) { + getString(R.string.PreferenceProxyPort), 0)) { editor .putInt(getString(R.string.PreferenceProxyPort), Integer.parseInt(getWidgetText(R.id.proxy_port))); mIsChanged = true; diff -r b8d88affb228 -r 779ac7aefd71 src/com/beem/project/beem/ui/SendIM.java --- a/src/com/beem/project/beem/ui/SendIM.java Fri Apr 24 17:20:59 2009 +0200 +++ b/src/com/beem/project/beem/ui/SendIM.java Fri Apr 24 17:22:03 2009 +0200 @@ -109,6 +109,7 @@ @Override protected void onResume() { super.onResume(); + mBeemApplication = BeemApplication.getApplication(this); if (!mBeemApplication.isConnected()) mBeemApplication.startBeemService(); mBeemApplication.callWhenConnectedToServer(mHandler, new Runnable() {