Tizen Native API
4.0
|
This example will show a flip with two rectangles on it(one blue, one green). Our example will allow the user to choose the animation the flip uses and to interact with it. To allow the user to choose the interaction mode we use radio buttons, we will however not explain them, if you would like to know more about radio buttons see Radio.
We start our example with the usual setup and then create the 2 rectangles we will use in our flip:
The next thing to do is to create our flip and set it's front and back content:
The next thing we do is set the interaction mode(which the user can later change) to the page animation:
Setting a interaction mode however is not sufficient, we also need to choose which directions we allow interaction from, for this example we will use all of them:
We are also going to set the hintsize to the entire flip(in all directions) to make our flip very easy to interact with:
After that we create our radio buttons and start the main loop:
When the user clicks a radio button a function that changes the interaction mode and animates the flip is called:
Our example will look like this: