Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old January 29th, 2012, 07:33 PM   #1 (permalink)
Junior Member
 
Join Date: Oct 2011
Posts: 20
 
Device(s):
Thanks: 1
Thanked 0 Times in 0 Posts
Default Landscape mode where y=0 mean the top of the screen??

Quote:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENT ATION_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?

zollen is offline  
Reply With Quote
Sponsors
Old January 29th, 2012, 08:14 PM   #2 (permalink)
Senior Member
 
Join Date: Jul 2010
Posts: 977
 
Device(s): Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Thanks: 52
Thanked 199 Times in 144 Posts
Default

In Java (and thus Android), the top-left is (0,0). It is quite counter-intuitive as just about every other graphics library/API considers the bottom-left as the "base", but not much we can do about it I suppose.
jonbonazza is online now  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 08:24 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo