Revision 98604824 src/com/rackspace/cloud/android/widget/GroupsListView.java
b/src/com/rackspace/cloud/android/widget/GroupsListView.java | ||
---|---|---|
3 | 3 |
|
4 | 4 |
|
5 | 5 |
|
6 |
import java.util.HashMap; |
|
6 | 7 |
import java.util.List; |
8 |
import java.util.Map; |
|
7 | 9 |
|
8 | 10 |
import android.content.Context; |
9 | 11 |
import android.util.AttributeSet; |
... | ... | |
13 | 15 |
import android.widget.BaseExpandableListAdapter; |
14 | 16 |
import android.widget.ExpandableListView; |
15 | 17 |
import android.widget.ImageView; |
16 |
import android.widget.ListAdapter; |
|
17 | 18 |
import android.widget.TextView; |
18 | 19 |
|
19 | 20 |
import com.rackspace.cloud.android.AndroidCloudApplication; |
... | ... | |
53 | 54 |
} |
54 | 55 |
|
55 | 56 |
public class GroupsListAdapter extends BaseExpandableListAdapter{ |
56 |
|
|
57 |
Map<Long,Long> childToGroup = new HashMap<Long,Long>(); |
|
57 | 58 |
public GroupsListAdapter() { |
58 | 59 |
|
59 | 60 |
} |
... | ... | |
116 | 117 |
|
117 | 118 |
@Override |
118 | 119 |
public long getChildId(int groupPosition, int childPosition) { |
119 |
return getGroups().size()+childPosition;
|
|
120 |
return childPosition; |
|
120 | 121 |
} |
121 | 122 |
|
122 | 123 |
@Override |
123 | 124 |
public long getGroupId(int groupPosition) { |
124 |
return groupPosition; |
|
125 |
return groupPosition*1000;
|
|
125 | 126 |
} |
126 | 127 |
|
127 | 128 |
|
... | ... | |
140 | 141 |
return true; |
141 | 142 |
} |
142 | 143 |
|
144 |
public void refreshMap(){ |
|
145 |
childToGroup.clear(); |
|
146 |
for(GroupResource g : getGroups()){ |
|
147 |
for(String s : g.getUsers()){ |
|
148 |
} |
|
149 |
} |
|
150 |
} |
|
151 |
|
|
143 | 152 |
} |
144 | 153 |
public GroupsListAdapter getListdapter() { |
145 | 154 |
return adapter; |
Also available in: Unified diff