SSISO Community

시소당

Rubik Cube Animation Example In Android

This example shows how you can create Rubik’s cube in android.

Algorithm:

1.) Create a new project by File-> New -> Android Project name it RubikCubeAnimationExample.

2.) Create and write following into src/M4.java:

 

 

 

3.) Create and write following into src/Layer.java:

 

 

 

4.) Create and write following into src/KubeRenderer.java:

 

 

 

5.) Create and write following into src/GLWorld.java:

 

 

 

6.) Create and write following into src/GLVertex.java:

 

 

 

7.) Create and write following into src/GLShape.java:

 

 

 

8.) Create and write following into src/GLFace.java:

 

 

 

10.) Create and write following into src/Cube.java:

 

 

 

11.) Run for output.

Steps:

1.) Create a project named RubikCubeAnimationExample and set the information as stated in the image.

Build Target: Android 4.0
Application Name: RubikCubeAnimationExample
Package Name: com. example. RubikCubeAnimationExample
Activity Name: RubikCubeAnimationExampleActivity
Min SDK Version: 14

2.) Open RubikCubeAnimationExampleActivity.java file and write following code there:

 

 

 

3.) Compile and build the project.

Output

562 view

4.0 stars