I know this question has been asked a few other times but I have yet to find a satisfactory answer. All previous answers work if you want the total screen resolution but fail to when you want to correct for the notification bar and/or the system bar in honeycomb.
Is there a way to determine the dimensions of the usable screen?
What I’ve done previously is almost definitely not the best way: make a control that is set to fill the screen and then check its size. This is useful if you have a view you paint to in a game or something like that.