blackjack
blackjack

Reputation: 585

Galaxy S4 screen layout design

As new to android and going with the screen layout design for different screen so followed the android developer site for multiple and now with the new device from samsung galaxy s4 designing the layout so after designing and running on the device the screen layout design all screwdup.Now the thing is in my app having the home screen which is having six button and for button having image so on putting all the six image the layout will look like this

enter image description here

so from the image as u can see the last image notification is not showing properly now the issue is i m not able to understand for which size of screen what size of image i m going to create if i take the height from the layout design screen and divide it into six part then also same result.example for google nexus 4 having height 1280/6 =image height so if i develop the image with that image height than also nothing change so need to know what different image size i need to create.

Upvotes: 1

Views: 831

Answers (1)

Nachi
Nachi

Reputation: 4248

If you want to fit all 6 elements in your layout, use layout_weights. First, put all 6 inside a LinearLayout with vertical orientation.

<LinearLayout>
    <View1 />
    ...
    <View6 />
</LinearLayout>

For all 6 elements, set the following dimensions:

android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.16" // 1/6 = 0.16

Upvotes: 1

Related Questions