Revision d433b50e
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/dialogs/RubikDialogScoresPagerAdapter.java | ||
---|---|---|
30 | 30 |
import android.view.ViewGroup; |
31 | 31 |
import android.widget.LinearLayout; |
32 | 32 |
|
33 |
import org.distorted.objectlib.main.ObjectType; |
|
34 |
|
|
35 | 33 |
import org.distorted.main.R; |
36 | 34 |
import org.distorted.network.RubikScores; |
37 | 35 |
import org.distorted.network.RubikNetwork; |
36 |
import org.distorted.objects.RubikObjectList; |
|
38 | 37 |
import org.distorted.screens.RubikScreenPlay; |
39 | 38 |
|
40 | 39 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
109 | 108 |
{ |
110 | 109 |
prepareView(); |
111 | 110 |
|
112 |
ObjectType[] types = ObjectType.values(); |
|
113 | 111 |
int MAX = RubikScreenPlay.LEVELS_SHOWN; |
114 | 112 |
int toDo=0; |
115 | 113 |
int[] toDoTab = new int[mNumTabs]; |
... | ... | |
118 | 116 |
|
119 | 117 |
for(int i=0; i<mNumTabs; i++) |
120 | 118 |
{ |
121 |
lastTab[i]= RubikScreenPlay.getDBLevel(types[i]);
|
|
119 |
lastTab[i]= RubikObjectList.getDBLevel(i);
|
|
122 | 120 |
maxTab[i] = Math.min(lastTab[i],MAX); |
123 | 121 |
toDoTab[i]= 0; |
124 | 122 |
|
... | ... | |
209 | 207 |
{ |
210 | 208 |
mAct = act; |
211 | 209 |
mDialog = diag; |
212 |
mNumTabs = ObjectType.NUM_OBJECTS;
|
|
210 |
mNumTabs = RubikObjectList.getNumObjects();
|
|
213 | 211 |
mViews = new RubikDialogScoresView[mNumTabs]; |
214 | 212 |
mViewPager = viewPager; |
215 | 213 |
mIsSubmitting = isSubmitting; |
Also available in: Unified diff
In the 'magic' app, ObjectType is now only used in RubikObject and RubikObjectList classes and nowhere else.
This is a major step towards being able to download objects from an online repository.