Copy link to clipboard
Copied
Hello,
I've done a Google Search for finding the screen size in Android, but only found Java code(which I can't use).
The closest thing I found was:
maxwidth=stage.stageWidth;
maxheight=stage.stageHeight;
And they seemed reasonable, however when I drew an object at maxwidth on my HTC Sensation, it only drew in about the middle of the screen.
So I am very confused. A person simply cannot write Aps for Android unless they can get screen size because everyone's phone is different.
Any help?
Copy link to clipboard
Copied
Found a thread that said:
stage.fullScreenHeight
and
stage.fullScreenWidth
But they were also wrong numbers.
The width was maybe 60% across the screen, not at the very end.
Copy link to clipboard
Copied
I don't need an answer very fast because I can still develop for my own resolution and tweak later once I get this code.
I do have a game you can play for free here:
http://www.goodnewsjim.com/DiamondDrop/HowToPlay.html
Which I ported to Android.
But no one can play it because everyone has different resolution phones
Someday, I'll have an ap on the Market
Copy link to clipboard
Copied
What is interesting is that:
w=stage.fullScreenWidth;
h=stage.fullScreenHeight;
Works for the emulated devices, but not my actual physical HTC Sensation
Copy link to clipboard
Copied
Ok, it seems like:
w=stage.fullScreenWidth;
h=stage.fullScreenHeight;
works properly
I checked by detecting mouseclicks, and the edge was 958 and w=stage.fullScreenWidth; gives w=960.
The problem comes in when I put something at x=900. Instead of being almost off the screen to the right, it is almost in the middle of the screen (60% in from the left).
Anyone know why this might happen on an HTC Sensation?