Android Image Swapping in 3D Animation Tutorial
Submitted by donbermoy on Wednesday, January 15, 2014 - 10:29.
In this tutorial, it is not simply swapping images by coding the image visibility to true or false but in this kind of tutorial I will introduce a unique swapping of images with 3D flipping in which it will swap in 3D Animation.
First you need to have your abstract design like this and have two ImageView and named it as i1 and i2 and then one label and put the text on it as "Click the image above". The abstract designer must be like below and named the layout it as "flip3dview1".
Here's the complete code for this Swapping Images in 3D Animation Application:
Note for this code:
* Dim a As ICOSFlip3DView - you need to create a variable for our image flipping and declare it on the Sub_Global. The ICOSFlip3DView can only be imported if you checked the library for ICOSFlip3DView.
*
- The code above will prompt the user when the swapping of images in 3D is ended. It will prompt the user "DONE".
Best regards,
Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Mobile Developer
09126450702
[email protected]
Visit my page on Facebook at: https://www.facebook.com/BermzISware
- Sub Process_Globals
- End Sub
- Sub Globals
- Dim a As ICOSFlip3DView
- Dim i1,i2 As ImageView
- End Sub
- Sub Activity_Create(FirstTime As Boolean)
- Activity.LoadLayout("flip3dview1")
- Activity.Title="Swapping 3D View - Lyndon Bermoy"
- End Sub
- Sub Activity_Resume
- End Sub
- Sub i1_Click
- a.Swap2View("a",i1,i2,300,a.FLIP_HORIZONTAL)
- End Sub
- Sub a_animationend
- ToastMessageShow("DONE",False)
- End Sub
- Sub esci_Click
- ExitApplication
- End Sub
a.Swap2View("a",i1,i2,300,a.FLIP_HORIZONTAL)
- is a syntax where a is our variable for ICOSFlip3DView library, "a" is the title in string, i1 is the first image to view in 3D, i2 is the second image to view in 3D, 300 is the duration in millisecond to swap the two image in 3D flipping, FLIP_HORIZONTAL is a method name to flip the image in a horizontal way.
* - Sub a_animationend
- ToastMessageShow("DONE",False)
- End Sub
Add new comment
- 30 views