• We just launched and are currently in beta. Join us as we build and grow the community.

Android Image Swapping in 3D Animation Tutorial

alalwi_gg7g

Cyber Sleuth
A Rep
0
0
0
Rep
0
A Vouches
0
0
0
Vouches
0
Posts
144
Likes
78
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
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".

swap_design.jpg


Here's the complete code for this Swapping Images in 3D Animation Application:

  1. Sub

    Process_Globals

  2. End

    Sub

  3. Sub

    Globals

  4. Dim

    a As

    ICOSFlip3DView
  5. Dim

    i1,i2 As

    ImageView

  6. End

    Sub

  7. Sub

    Activity_Create(FirstTime As

    Boolean

    )
  8. Activity.LoadLayout("flip3dview1"

    )
  9. Activity.Title="Swapping 3D View - Lyndon Bermoy"
  10. End

    Sub

  11. Sub

    Activity_Resume
  12. End

    Sub

  13. Sub

    i1_Click
  14. a.Swap2View("a"

    ,i1,i2,300,a.FLIP_HORIZONTAL)
  15. End

    Sub

  16. Sub

    a_animationend
  17. ToastMessageShow("DONE"

    ,False

    )
  18. End

    Sub

  19. Sub

    esci_Click
  20. ExitApplication
  21. End

    Sub

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.

* 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.

*
  1. Sub

    a_animationend
  2. ToastMessageShow("DONE"

    ,False

    )
  3. End

    Sub

- 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


Download
You must upgrade your account or reply in the thread to view hidden text.
 

452,158

323,328

323,337

Top