Register now » Login
« Login

Forgotten your password?

You are here: Android Forum » Android Developer Forum » Android Developer Forum » Landscape mode where y = 0 mean the top of the screen??
Go to: Recent posts | Own threads | Watched threads

Landscape mode where y = 0 mean the top of the screen??

You must be registered at AndroidPIT in order to participate in the Android Forum.

User picture
Stephen Kongen

Rank: Android Junior

Posts: 17

Join date: Oct 11, 2011

Landscape mode where y = 0 mean the top of the screen??
created on Jan 30, 2012 2:30:11 AM
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

I put the above statement in my Activity. But I was surprised to find out that x/y coordinates where y = 0 is actually represent the top of the screen and y = screen height actually represent the bottom of the screen. This is a bit counter-intutive because I throught y = 0 should means the bottom of the screen.

Is this the correct y axis representation in landscape mode, or I might have missed some important setup or coding?
Reply with quote Reply Link ±0     (0 votes)
User picture
Jeremiahen
Google Plus Twitter Facebook YouTube

Status: Moderator

Rank: Android Silver Senior

Posts: 718

Join date: Apr 28, 2010

RE: Landscape mode where y = 0 mean the top of the screen??
created on Feb 1, 2012 4:33:30 AM
Y = 0 is the top of the screen, in landscape or portrait mode. I know its awkward for someone coming from a geometric Cartesian coordinate system, which has 0 at the bottom. But almost all computer language all the way back from GW-Basic have put 0 at the top.
Reply with quote Reply Link ±0     (0 votes)
You are here: Android Forum » Android Developer Forum » Android Developer Forum » Landscape mode where y = 0 mean the top of the screen??
Go to: Recent posts | Own threads | Watched threads

Support AndroidPIT

Do you enjoy AndroidPIT? We?re thrilled to have your support! How does it work? Just click on the links below.

Recommend to Others

Enjoy AndroidPIT? Then please let other people know about us!

Questions / Help

Do you have questions about AndroidPIT or simply want to learn more about us? Then you might find the following links helpful.

  You are reading: Landscape mode where y = 0 mean the top of the screen?? - Android Forum - AndroidPIT. All times are UTC+02:00. The time now is 6:08 PM.