Revision 8e3898c8
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/dialogs/RubikDialogScoresPagerAdapter.java | ||
---|---|---|
32 | 32 |
import org.distorted.scores.RubikScoresDownloader; |
33 | 33 |
import org.distorted.objects.RubikObjectList; |
34 | 34 |
|
35 |
import static org.distorted.states.RubikStatePlay.MAX_LEVEL; |
|
36 |
|
|
37 | 35 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
38 | 36 |
|
39 | 37 |
class RubikDialogScoresPagerAdapter extends PagerAdapter implements RubikScoresDownloader.Receiver |
... | ... | |
136 | 134 |
|
137 | 135 |
private void addPage(int tab, final RubikDialogScoresView view, final String[][] country, final String[][] name, final float[][] time) |
138 | 136 |
{ |
139 |
for(int i=0; i<MAX_LEVEL; i++) |
|
137 |
int object = RubikObjectList.unpackObject(tab); |
|
138 |
int sizeIndex= RubikObjectList.unpackSizeIndex(tab); |
|
139 |
int maxLevel = RubikObjectList.getMaxLevel(object, sizeIndex); |
|
140 |
|
|
141 |
for(int i=0; i<maxLevel; i++) |
|
140 | 142 |
{ |
141 | 143 |
final LinearLayout section = view.createSection(mAct, tab, i, country[i], name[i], time[i]); |
142 | 144 |
|
Also available in: Unified diff
Each object size now has its own number of levels (not always 18!)