Revision 4918f19c
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/magic/RubikScores.java | ||
---|---|---|
63 | 63 |
} |
64 | 64 |
}); |
65 | 65 |
|
66 |
Bundle args = getArguments(); |
|
67 |
int curTab; |
|
68 |
|
|
69 |
try |
|
70 |
{ |
|
71 |
curTab = args.getInt("tab"); |
|
72 |
} |
|
73 |
catch(Exception e) |
|
74 |
{ |
|
75 |
curTab = 0; |
|
76 |
} |
|
77 |
|
|
66 | 78 |
LayoutInflater inflater = act.getLayoutInflater(); |
67 | 79 |
final View view = inflater.inflate(R.layout.scores, null); |
68 | 80 |
builder.setView(view); |
... | ... | |
72 | 84 |
mPagerAdapter = new RubikScoresPagerAdapter(act,viewPager); |
73 | 85 |
tabLayout.setupWithViewPager(viewPager); |
74 | 86 |
|
75 |
Bundle args = getArguments(); |
|
76 |
int button = args.getInt("button"); |
|
77 |
viewPager.setCurrentItem(button); |
|
87 |
viewPager.setCurrentItem(curTab); |
|
78 | 88 |
|
79 | 89 |
for (int i = 0; i< RubikSize.LENGTH; i++) |
80 | 90 |
{ |
Also available in: Unified diff
Various improvements.