# HG changeset patch # User Nikita Kozlov # Date 1254488723 -7200 # Node ID fbac93bba31030868ad22096153c44b7de2c7447 # Parent 13468f4c8f4504f3390a67dd45004ce179d72c35 un petit peu de doc en plus diff -r 13468f4c8f45 -r fbac93bba310 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(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(); - } + } } /**