Revision a84c3a25
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/dialogs/RubikDialogTutorial.java | ||
---|---|---|
141 | 141 |
{ |
142 | 142 |
super.onResume(); |
143 | 143 |
|
144 |
if( mPagerAdapter!=null ) mPagerAdapter.clickPossible(); |
|
145 |
|
|
144 | 146 |
Window window = getDialog().getWindow(); |
145 | 147 |
Context context = getContext(); |
146 | 148 |
|
src/main/java/org/distorted/dialogs/RubikDialogTutorialPagerAdapter.java | ||
---|---|---|
50 | 50 |
viewPager.setOffscreenPageLimit(1); |
51 | 51 |
} |
52 | 52 |
|
53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
54 |
|
|
55 |
void clickPossible() |
|
56 |
{ |
|
57 |
for(int i=0; i<mNumTabs; i++) |
|
58 |
{ |
|
59 |
if( mViews[i]!=null ) |
|
60 |
{ |
|
61 |
mViews[i].clickPossible(true); |
|
62 |
} |
|
63 |
} |
|
64 |
} |
|
65 |
|
|
53 | 66 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
54 | 67 |
|
55 | 68 |
@Override |
src/main/java/org/distorted/dialogs/RubikDialogTutorialView.java | ||
---|---|---|
45 | 45 |
|
46 | 46 |
public class RubikDialogTutorialView extends FrameLayout |
47 | 47 |
{ |
48 |
private boolean mCanClick; |
|
49 |
|
|
50 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
51 |
|
|
48 | 52 |
public RubikDialogTutorialView(Context context, AttributeSet attrs, int defStyle) |
49 | 53 |
{ |
50 | 54 |
super(context, attrs, defStyle); |
... | ... | |
63 | 67 |
{ |
64 | 68 |
super(act); |
65 | 69 |
|
70 |
clickPossible(true); |
|
66 | 71 |
int widthT = (int)(width* RubikActivity.TUTORIAL_ITEM_TEXT); |
67 | 72 |
|
68 | 73 |
RubikActivity ract = (RubikActivity)getContext(); |
... | ... | |
94 | 99 |
addView(tab); |
95 | 100 |
} |
96 | 101 |
|
102 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
103 |
|
|
104 |
void clickPossible(boolean click) |
|
105 |
{ |
|
106 |
mCanClick = click; |
|
107 |
} |
|
108 |
|
|
97 | 109 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
98 | 110 |
|
99 | 111 |
private View createRow(final RubikActivity act, int countryID, final String desc, final String url, |
... | ... | |
111 | 123 |
@Override |
112 | 124 |
public void onClick(View v) |
113 | 125 |
{ |
114 |
act.switchTutorial(url,obj,size); |
|
115 |
analyticsReport(act,desc,auth,obj,size); |
|
126 |
if( mCanClick ) |
|
127 |
{ |
|
128 |
act.switchTutorial(url,obj,size); |
|
129 |
analyticsReport(act,desc,auth,obj,size); |
|
130 |
clickPossible(false); |
|
131 |
} |
|
116 | 132 |
} |
117 | 133 |
}); |
118 | 134 |
|
src/main/java/org/distorted/helpers/MovesAndLockController.java | ||
---|---|---|
215 | 215 |
if( System.currentTimeMillis()-mLockTime > LOCK_TIME ) |
216 | 216 |
{ |
217 | 217 |
changeLockIcon(act,false); |
218 |
mTimer.cancel(); |
|
219 |
mTimer = null; |
|
218 |
|
|
219 |
if( mTimer!=null ) |
|
220 |
{ |
|
221 |
mTimer.cancel(); |
|
222 |
mTimer = null; |
|
223 |
} |
|
224 |
|
|
220 | 225 |
mTimerRunning = false; |
221 | 226 |
} |
222 | 227 |
} |
Also available in: Unified diff
Make it impossible to launch more than one Tutorial screen at a time.