Revision 18d47965
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/tutorials/TutorialActivity.java | ||
---|---|---|
11 | 11 |
|
12 | 12 |
import java.io.InputStream; |
13 | 13 |
|
14 |
import android.content.Intent; |
|
14 | 15 |
import android.os.Build; |
15 | 16 |
import android.os.Bundle; |
16 | 17 |
import android.util.DisplayMetrics; |
... | ... | |
31 | 32 |
import org.distorted.dialogs.RubikDialogError; |
32 | 33 |
import org.distorted.objects.RubikObject; |
33 | 34 |
import org.distorted.objects.RubikObjectList; |
35 |
import org.distorted.purchase.PurchaseActivity; |
|
34 | 36 |
|
35 | 37 |
import static org.distorted.objectlib.main.TwistyObject.MESH_NICE; |
36 | 38 |
|
... | ... | |
266 | 268 |
return view.getObjectControl(); |
267 | 269 |
} |
268 | 270 |
|
271 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
272 |
|
|
273 |
public void switchToPurchase() |
|
274 |
{ |
|
275 |
Intent intent = new Intent(this, PurchaseActivity.class); |
|
276 |
intent.putExtra("obj", mObjectOrdinal); |
|
277 |
startActivity(intent); |
|
278 |
} |
|
279 |
|
|
269 | 280 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
270 | 281 |
|
271 | 282 |
public static int getDrawableSize() |
src/main/java/org/distorted/tutorials/TutorialScreen.java | ||
---|---|---|
35 | 35 |
|
36 | 36 |
private void setupLockButton(final TutorialActivity act) |
37 | 37 |
{ |
38 |
int icon = RubikActivity.getDrawable(R.drawable.ui_small_locked_red,R.drawable.ui_medium_locked_red, R.drawable.ui_big_locked_red, R.drawable.ui_huge_locked_red);
|
|
38 |
int icon = RubikActivity.getDrawable(R.drawable.ui_small_locked,R.drawable.ui_medium_locked, R.drawable.ui_big_locked, R.drawable.ui_huge_locked);
|
|
39 | 39 |
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f); |
40 | 40 |
mLockButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_MIDDLE, params); |
41 |
mLockButton.setClickable(false); |
|
41 |
|
|
42 |
mLockButton.setOnClickListener( new View.OnClickListener() |
|
43 |
{ |
|
44 |
@Override |
|
45 |
public void onClick(View v) |
|
46 |
{ |
|
47 |
act.switchToPurchase(); |
|
48 |
} |
|
49 |
}); |
|
42 | 50 |
} |
43 | 51 |
|
44 | 52 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
TutorialActivity: link to PurchaseActivity.