Revision dd73fdab
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/magic/RubikScoresViewPager.java | ||
---|---|---|
39 | 39 |
{ |
40 | 40 |
mContext = context; |
41 | 41 |
viewPager.setAdapter(this); |
42 |
viewPager.setOffscreenPageLimit( RubikScoresTab.LENGTH-1 );
|
|
42 |
viewPager.setOffscreenPageLimit( RubikSize.LENGTH-1 );
|
|
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
48 | 48 |
@NonNull |
49 | 49 |
public Object instantiateItem(@NonNull ViewGroup collection, int position) |
50 | 50 |
{ |
51 |
int scoresTab= RubikScoresTab.getTab(position).getLayout();
|
|
51 |
int scoresTab= RubikSize.getSize(position).getLayout();
|
|
52 | 52 |
LayoutInflater inflater = LayoutInflater.from(mContext); |
53 | 53 |
ViewGroup layout = (ViewGroup) inflater.inflate(scoresTab, collection, false); |
54 | 54 |
collection.addView(layout); |
... | ... | |
69 | 69 |
@Override |
70 | 70 |
public int getCount() |
71 | 71 |
{ |
72 |
return RubikScoresTab.LENGTH;
|
|
72 |
return RubikSize.LENGTH;
|
|
73 | 73 |
} |
74 | 74 |
|
75 | 75 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Improvements