rafael
rafael

Reputation: 732

Android 4 bars size(Galaxy Nexus)

What are the sizes of Status Bar, Navigation Bar and Title Bar in pixels in galaxy nexus?

I think its because of them that my background image(720x1280 px) is getting with height stretched.

My layout:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/splash" >

Upvotes: 1

Views: 8208

Answers (3)

Luciano Rodr&#237;guez
Luciano Rodr&#237;guez

Reputation: 2309

48 dp is not the same than 48 px. 48 dps for a xhdpi / normal screen device like Nexus is the same than 96px.

Upvotes: 0

Alistair Dabbs
Alistair Dabbs

Reputation: 21

If you mean the Nexus 7 tablet running Android 4.1, the nav bar at the bottom appears visually to be significantly deeper than the 48 pixels described in the dev guide linked in the message above. Analysing a screengrab suggests that the new nav bar is 75 px in portrait. I'm still hunting for the definitive measurement.

Upvotes: 2

gian1200
gian1200

Reputation: 3864

Is this what you are looking for? http://developer.android.com/design/style/metrics-grids.html

Navigation Bar and Action Bar have a height (or width) of 48dp.

If you want to remove everything (except the buttons), you can add this in the declaration of your activity in the manifest

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

Upvotes: 3

Related Questions