Skip to main content
Known Participant
June 20, 2013
Answered

Action Bar height in pixels Android

  • June 20, 2013
  • 1 reply
  • 2281 views

Dear developers,

I am developing an app for Android/iOS tablets.  Testing on a Samsung 10.1 Tab, I know the height of the action bar is 48 pixels, regardless of orientation.  I do not own a 7 inch tablet, but from images figured out for the Samsung 7.0 Tab it is also 48 pixels.

Does anyone know if 48 pixel height for the action bar is common across all 10 inch and 7 inch tablets?

I am using SHOWALL for the scaling and need to put some black bars on the side, in the event that the screen ratio does not match with the ratio I programmed the app in (800 x 470 = 1.70).  I know showall does this for you, but I have some things off to the stage that sort of have to be there that show up when the device ratio is not also 1.70.

Thank you,

Justin

This topic has been closed for replies.
Correct answer Colin Holgate

The status bar on the Kindle Fire varies, depending on the user’s actions. What you could do instead of having black bars, have extra background going off the edges of the stage. That then gets revealed on the wider screens. show_all only shows all of the stage area, so having the extra background won’t suddenly make the area shrink.

1 reply

Colin Holgate
Colin HolgateCorrect answer
Inspiring
June 20, 2013

The status bar on the Kindle Fire varies, depending on the user’s actions. What you could do instead of having black bars, have extra background going off the edges of the stage. That then gets revealed on the wider screens. show_all only shows all of the stage area, so having the extra background won’t suddenly make the area shrink.

Known Participant
June 20, 2013

Dear Colin, thank you for your response.  I have been reading your previous posts on this subject and your scale mode.....what I have done is made two virtually identical apps....one for the 4:3 ratio of apple and one that is 800x470 (470 to account for the 48 pixels on the Samsung Tablet 10.1).  If I had known about your approach before I started coding 18 months ago, I would have followed it from the start.

That option does not quite work for my app, as I have objects coming in at random angles, rotations on the stage from the edge and I turn their visibility on just before they enter the stage (just off of the stage, not at when they cross the x-y boundary of the stage).  There x-y is centered on the object and the objects (asteroids) all have different shapes.

But I am going to think about your approach to see how painful it would be in terms of coding for the asteroids.  They are basically linear equations that I have that move the asteroids across the stage.

Thank you,

Justin