0

I'm designing an application in landscape orientation. I use my Galaxy S2 emulator. Designing in Photoshop Working with 800x480 resolution.

After Eclipse I work only with the directory "drawable" and "layout".

I use a converter dp px (ex: dp px converter).

For example if the above image is 800x398px. I declare in "layout/activity.xml" width: 533.33dp, height: 260.00dp and scaleType = "fitXY".

In the web convesor, I use the option @ High density (240), HDPI

Usually in other applications it has worked well. I just used "drawable-ldpi", "drawable-mdpi", "drawable-hdpi".. for icons.

If you look at the attached screenshots, the Galaxy S2 design is perfect, but in a Galaxy S3, higher image falls short and the other buttons are poorly located and with different sizes.

How I can fix (not just for Galaxy S3, but also for other resolutions?

What name are directories layout or drawable? What values ​​entered in the layout?

I read: + Android Multiple Screens + Application Skeleton to support multiple screen + layout folder name for devices 720x1280 like samsung galaxy s3

But despite trying with different names in directories and dp values, I have not found the solution nor understand.

Can anyone help me understand it and make it work?

Thank you..

Galaxy S2: Galaxy S2

Galaxy S3 (fail): enter image description here

Community
  • 1
  • 1
ephramd
  • 561
  • 2
  • 15
  • 41
  • Well, if you read it and don't understand it, perhaps find someone to teach you? If you have more specific questions, feel free to ask here. – Shade Mar 25 '13 at 00:53
  • 1
    Don't use the word resolution. In Android, we have densities and sizes. When dealing with large sizes of drawables that can take up the entire screen, you have to use different sizes (not just different densities). – Stephan Branczyk Mar 25 '13 at 01:04

1 Answers1

1
  1. For image you can use nine patch - http://android-ui-utils.googlecode.com/hg/asset-studio/dist/nine-patches.html
  2. For layout you can use % value, then you just need to create one layout for every device.

How:

  • You need to use linearlayout for everything.
  • Set Weight Sum to: 1 in linearlayout.
  • Drop 2 button for example.
  • Set 0dp for Width for both buttons.
  • Inside Weight you can set 0.60 and 0.40 for each. (linear horizontal layout)
Marckaraujo
  • 7,422
  • 11
  • 59
  • 97