MOdification contact list.
--- 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
--- 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 @@
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:spacing="10px" />
+ android:layout_height="wrap_content" android:spacing="50px" />
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="horizontal">
@@ -13,5 +13,4 @@
android:layout_height="fill_parent" />
</LinearLayout>
-
</LinearLayout>
--- 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<String> 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;
}
}
}
-
-
}
/**