# HG changeset patch # User Vincent Veronis # Date 1253812418 -7200 # Node ID 735a00bd56cb7478bbb37d48367e5918881a1bd6 # Parent 295cc30ae84a38af02925a69153e0fe6a0b0d6b4 MOdification contact list. diff -r 295cc30ae84a -r 735a00bd56cb default.properties --- a/default.properties Thu Sep 24 14:06:24 2009 +0200 +++ b/default.properties Thu Sep 24 19:13:38 2009 +0200 @@ -8,7 +8,7 @@ # project structure. # Project target. -target=android-3 +target=android-4 # apk configurations. This property allows creation of APK files with limited # resources. For example, if your application contains many locales and # you wish to release multiple smaller apks instead of a large one, you can diff -r 295cc30ae84a -r 735a00bd56cb res/layout/contactlist.xml --- a/res/layout/contactlist.xml Thu Sep 24 14:06:24 2009 +0200 +++ b/res/layout/contactlist.xml Thu Sep 24 19:13:38 2009 +0200 @@ -5,7 +5,7 @@ + android:layout_height="wrap_content" android:spacing="50px" /> @@ -13,5 +13,4 @@ android:layout_height="fill_parent" /> - diff -r 295cc30ae84a -r 735a00bd56cb src/com/beem/project/beem/ui/ContactList.java --- a/src/com/beem/project/beem/ui/ContactList.java Thu Sep 24 14:06:24 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactList.java Thu Sep 24 19:13:38 2009 +0200 @@ -426,43 +426,42 @@ public void onEntriesUpdated(List addresses) throws RemoteException { mHandler.post(new RunnableChange()); } - + @Override - public void onEntryDeleteFromGroup(String group, String jid) - throws RemoteException { + public void onEntryDeleteFromGroup(String group, String jid) throws RemoteException { // TODO Auto-generated method stub - - } + } + /** * {@inheritDoc} */ @Override public void onPresenceChanged(PresenceAdapter presence) throws RemoteException { - //TODO gerer la presence au niveau de chaque ressources ? + // TODO gerer la presence au niveau de chaque ressources ? String from = presence.getFrom(); boolean resfound = false; for (Contact curContact : mListContact) { if (curContact.getJID().equals(StringUtils.parseBareAddress(from))) { String pres = StringUtils.parseResource(from); for (String res : curContact.getMRes()) { - if (res.equals(pres)) { - resfound = true; - break; - } - } + if (res.equals(pres)) { + resfound = true; + break; + } + } curContact.setStatus(mRoster.getPresence(StringUtils.parseBareAddress(presence.getFrom()))); int status = presence.getStatus(); - if (!resfound && (status != Status.CONTACT_STATUS_DISCONNECT && status != Status.CONTACT_STATUS_UNAVAILABLE)) + if (!resfound + && (status != Status.CONTACT_STATUS_DISCONNECT && status != Status.CONTACT_STATUS_UNAVAILABLE)) curContact.addRes(pres); - else if (resfound && (status == Status.CONTACT_STATUS_DISCONNECT && status == Status.CONTACT_STATUS_UNAVAILABLE)) + else if (resfound + && (status == Status.CONTACT_STATUS_DISCONNECT && status == Status.CONTACT_STATUS_UNAVAILABLE)) curContact.delRes(pres); mHandler.post(new RunnableChange()); return; } } } - - } /**