0

I have a landscape layout divided into two sections, the left section is the menu and the right section is the content.

I tested the application on

Nexus 10 which is an xhdpi device and Nexus 7 2013 which is also an xhdpi device

But the problem is that the menu will not fit entirely on the Nexus 7, only half the menu is displayed, is there anyway to scale the Menu so it fits devices like the Nexus 7 ?

Onur A.
  • 3,007
  • 3
  • 22
  • 37
Eric Bergman
  • 1,453
  • 11
  • 46
  • 84

4 Answers4

1

yes, use the different folder for supporting different screen sizes to put a layout specific to a 7" tablet

http://developer.android.com/training/basics/supporting-devices/screens.html

you would want the folder layout-sw600dp to be specific

tyczj
  • 71,600
  • 54
  • 194
  • 296
  • I understand that I need to create a new layout but the problem isn't with creating a new layout, in the left menu I have has 12 buttons vertically, each button is an Image (XHDPI) but since the Nexus 7 has a 7" screen instead of a 10" screen not all the contents of the Menu will be displayed only the first 7 options are dispalyed. Is there something I can do to make all the options scale down ? – Eric Bergman Aug 14 '13 at 18:57
  • use a scrollview? or change the size of the buttons in the different layout specific for the 7" tablet – tyczj Aug 14 '13 at 18:59
  • it would probably be helpful if you showed us what it looked like – tyczj Aug 14 '13 at 19:06
  • I'm already using a scrollview but since I have a background image for the entire menu and some things have to be in specific locations in the background it's not the behavior I want, I wish there was another way besides creating new images for 7" tablet. – Eric Bergman Aug 14 '13 at 19:48
0

Try using the android:weight=“1" attribute and set layout_width="wrap_ content" in the layout.XML

MattMatt
  • 905
  • 6
  • 19
0

Agree with @tyczj answer, also you should add -land suffix if you aim landscape orientation e.g layout-sw600dp-land

Onur A.
  • 3,007
  • 3
  • 22
  • 37
  • I understand that I need to create a new layout but the problem isn't with creating a new layout, in the left menu I have has 12 buttons vertically, each button is an Image (XHDPI) but since the Nexus 7 has a 7" screen instead of a 10" screen not all the contents of the Menu will be displayed only the first 7 options are dispalyed. Is there something I can do to make all the options scale down ? – Eric Bergman Aug 14 '13 at 18:59
  • you can use 9-patch images, they will adjust theirselves, or if you past your layout xml i can better help – Onur A. Aug 14 '13 at 19:00
0

You may have already gone over this, but I would suggest reading through, Android's guide on supporting multiple screen sizes. Declaring Tablet Layouts for Android

CAM-Dev
  • 186
  • 3