un petit peu de doc en plus
authorNikita Kozlov <nikita@beem-project.com>
Fri, 02 Oct 2009 15:05:23 +0200
changeset 437 fbac93bba310
parent 436 13468f4c8f45
child 438 051fa95b54f7
un petit peu de doc en plus
src/com/beem/project/beem/ui/GroupList.java
--- a/src/com/beem/project/beem/ui/GroupList.java	Fri Oct 02 14:56:42 2009 +0200
+++ b/src/com/beem/project/beem/ui/GroupList.java	Fri Oct 02 15:05:23 2009 +0200
@@ -22,8 +22,8 @@
 import com.beem.project.beem.utils.BeemBroadcastReceiver;
 
 /**
+ * That activity permit to manage user groups.
  * @author nikita
- *
  */
 public class GroupList extends ListActivity {
 
@@ -44,6 +44,11 @@
 	SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
     }
 
+    /**
+     * Constructor.
+     */
+    public GroupList() {
+    }
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -55,7 +60,7 @@
 
 	listView.setItemsCanFocus(false);
 	listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
-	
+
 	mText = (TextView) findViewById(R.id.GroupListText);
     }
 
@@ -80,15 +85,26 @@
 	if (mReceiver.isBinded())
 	    unbindService(mServConn);
     }
-    
+
+    /**
+     * On group click listener.
+     * @param l The ListView where the click happened
+     * @param v The view that was clicked within the ListView
+     * @param position The position of the view in the list
+     * @param id The row id of the item that was clicked
+     */
     protected void onListItemClick(ListView l, View v, int position, long id) {
-	Log.d("GROUPLIST","CLICK");	
+	Log.d("GROUPLIST", "CLICK");
     }
-    
-    private void setAdapter(){
+
+    /**
+     * init activity lsit adapter.
+     */
+    private void setAdapter() {
 	try {
 	    mGroups = new ArrayAdapter<String>(this,
-		android.R.layout.simple_list_item_multiple_choice, mRoster.getGroupsNames().toArray(new String[(mRoster.getGroupsNames().size())]));
+		android.R.layout.simple_list_item_multiple_choice,
+		mRoster.getGroupsNames().toArray(new String[mRoster.getGroupsNames().size()]));
 	    setListAdapter(mGroups);
 	    mContact = mRoster.getContact(mJID);
 	    for (String group : mContact.getGroups()) {
@@ -96,7 +112,7 @@
 	    }
 	} catch (RemoteException e) {
 	    e.printStackTrace();
-	}	
+	}
     }
 
     /**