Friday, 20 December 2013

Learning Process2 : Orientation

Orientation.

The next step i will like to learn to how to code for orientation but in still a test either user will use the app in portrait or in landscape mode. So i  try to learn how to program orientation.

before start the coding i use some of the design i did before so that i can use it to check the coding.

portrait mode


landscape mode

I find this tutorial that teach me how to code for orientation. So basically is using that stage to check with accelerometer when the stage size is bigger than the object image it will size between landscape and portrait.

The youtube tutorial video link
http://www.developphp.com/view.php?tid=1181



This video is simple and basic for beginners to follow on, the voiceover help to understand and easier to follow what and where is the point is it pointing. I take sometime to watch the video. The i realise the are open source share for me to use and create a trail.

I create my own by referencing on the source code that are share online.


beside that i also code some event listener to check after the stage is rotate do the button still can function.

So basically, i learn how create condition to make the screen switch base of stage size instate of accelerometer.

Beside that i realise this code only can check with a mobile devices but so far i don't really have an android device so i only can check whether the button is functioning or not.

No comments:

Post a Comment