Results 1 to 6 of 6
- 02-11-2013, 10:49 PM
Thread Author #1
Resoution discrepency
This one's driving me nuts.
I'm writing an app and have been testing it on my nice shiny new N10 - but my app is reporting the screen resolution as 2464 * 1600 ??!!
It's not the code as far as I can see as it returns the correct resolution on multiple handsets - just not my N10.
Anyone know where my missing 96 pixels went? I've Google'd this like crazy, but not come up with anything yet
PS Lovin' the N10 - best purchase I've made over the last year! - 02-12-2013, 02:56 PM #2
- 02-12-2013, 04:00 PM #3
Re: Resoution discrepency
The resolution available to your application itself will be the current statusbar and navbar height subtracted from the full current height. On a device running the tablet UI, they are typically combined at the bottom. If you'd like the application to run in a full-screen mode, try one of the following:
In your manifest:
You can also declare this at the activity level in your manifest, if you only want specific activities to run fullscreen.Code:<application android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
Alternatively, in your activity's onCreate:
Call these two methods after super.onCreate() and before setContentView().Code:requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Represent yourself well; you never know what might happen. And try out the new Android Central app!

Softbricking be damned. - 02-12-2013, 10:54 PM
Thread Author #4
Re: Resoution discrepency
Hey, thanks for the suggestions, unfortunately, I'm already running without status bar - but maybe there's something else I need to do in Jelly bean? I mean a phone with a 800 x 480 res is reporting exactly that once running without status bar, but the nexus, doesn't - it's really odd. The bar does disappear. (I am using the first method, application level declaration in the manifest)
- 02-13-2013, 03:10 AM #5
Re: Resoution discrepency
Unfortunately I won't have access to my Nexus 10 for a few days, so I can't do any specific testing for you. If your goal here is simply to get information pertaining to the display itself (such as physical resolution), I would look at using the .
You should be able to use public int heightPixels and public float ydpi do perform basic calculations, but I should caution you that if this application is intended for more than personal use (i.e. it will be distributed, via the Play Store or other channels), carrying out actions based on the display's physical dimensions may lead to fragmentation issues similar to the one you're already trying to solve.Code:DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics);
Additionally, there are methods of determining the height of the statusbar/navbar on the screen, which theoretically could be used in conjunction with the above code for accessing the display size in order to determine the remaining space for your application. But again, I should note that you may run into fragmentation issues when you start relying on such calculations.Represent yourself well; you never know what might happen. And try out the new Android Central app!

Softbricking be damned.Thanked by: - 02-20-2013, 07:26 PM
Thread Author #6
Re: Resoution discrepency
Thanks mate, I'm using a similar method - but I will try the code you posted. I'm passing it from my activity into my SurfaceView class and using it for a full screen canvas. I need to do it this way as I need to know what size the canvas is going to be before it's been created (for created scaled bitmaps etc). It will be published on the Play Store eventually. It just kind of threw me because every other device I've tested it on returns the correct device resolution. Strange!
Similar Threads
-
Time Discrepancy issues
By LegalAmerican in forum Samsung Galaxy Note 10.1Replies: 2Last Post: 08-28-2012, 10:58 PM -
Battery Discrepancy
By maxman1 in forum Droid RAZR MAXXReplies: 2Last Post: 07-26-2012, 07:06 PM -
Storage Discrepancy?
By brown3h in forum Google Nexus 7 TabletReplies: 5Last Post: 07-25-2012, 04:36 AM -
ICS Data Usage Discrepancy from Verizon
By Miguel611 in forum Verizon Galaxy NexusReplies: 19Last Post: 03-19-2012, 07:57 PM -
Battery life discrepancies...
By slopokdave in forum Samsung Galaxy Tab 10-inchReplies: 7Last Post: 06-16-2011, 11:29 AM



Reply



































