Revision beb325a0
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/magic/RubikScoresPagerAdapter.java | ||
---|---|---|
42 | 42 |
|
43 | 43 |
int c = mViewPager.getCurrentItem(); |
44 | 44 |
|
45 |
addPage(c,country[c],name[c],time[c]);
|
|
45 |
addPage(mViews[c],country[c],name[c],time[c]);
|
|
46 | 46 |
|
47 | 47 |
for(int i=0; i<RubikSize.LENGTH; i++) |
48 | 48 |
{ |
49 | 49 |
if( i==c ) continue; |
50 | 50 |
|
51 |
addPage(i,country[i],name[i],time[i]);
|
|
51 |
addPage(mViews[i],country[i],name[i],time[i]);
|
|
52 | 52 |
} |
53 | 53 |
} |
54 | 54 |
|
... | ... | |
79 | 79 |
|
80 | 80 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
81 | 81 |
|
82 |
private void addPage(final int page, final int[][] country, final String[][] name, final String[][] time)
|
|
82 |
private void addPage(final RubikScoresView view, final int[][] country, final String[][] name, final String[][] time)
|
|
83 | 83 |
{ |
84 | 84 |
for(int section=0; section<RubikActivity.MAX_SCRAMBLE; section++) |
85 | 85 |
{ |
... | ... | |
93 | 93 |
@Override |
94 | 94 |
public void run() |
95 | 95 |
{ |
96 |
mViews[page].addSection(mAct, sec, c, n, t);
|
|
96 |
view.addSection(mAct, sec, c, n, t);
|
|
97 | 97 |
} |
98 | 98 |
}); |
99 | 99 |
|
Also available in: Unified diff
Major restructuring - separate the Manipulated Objects (i.e. at the time being - Cubes of various sizes) and the class holding knowledge how those Objects move ( RubikCubeMovement ) into a separate package; remove all knowledge of Objects and the way they move from the main package.