Tizen Native API
3.0
|
This example shows how to change the color of a rectangle using a color selector. We aren't going to explain a lot of the code since it's the usual setup code:
Now that we have a window with background and a rectangle we can create our color_selector
Now colors can be loaded to color selector's palette by setting the palette name
Next we ask to be notified whenever the color changes on selector:
Next we ask to be notified whenever the color item is selected and longpressed:
We add some more code to the usual setup code:
now get to the "changed" callback that sets the color of the rectangle:
And now get to the "color,item,selected" callback that sets the color of the rectangle:
And now get to the "color,item,longpressed" callback that gets and displays the color of the rectangle:
This example will look like this:
