RpBarros
RpBarros

Reputation: 21

Best way to support 540X960 and 480X800 -- both hdpi?

I have 3 phones -- a Motorola ATRIX 2 mb865, a Motorola DROID X, and a HTC Droid Incredible 2 ADR6350. The Motorola ATRIX 2 is Android 2.3.5, the HTC is Android 2.3.4, and the Motorola DROID X is Android 2.3. I can't get the app to display correctly on all three screens.

Since they are all high density--HDPI, creating a drawable-hdpi directory didn't seem to do any good. With the same artwork (480x800), the fields fits ok on the Motorola DROID X and on HTC but is too small on the Motorola Atrix 2. So I figured it was a screen size problem, but I've been trying a lot of different recommendations (drawable-sw540dp, drawable-sw330dp,drawable-h500dp, layout-sw540dp, or a number of others) but still does not work. I cant figure it out how to fit perfectly in all three devices.

I was trying to do what this guys were saying but with no success. http://forums.xamarin.com/discussion/2784/best-way-to-support-540x960-and-480x800-both-hdpi

If you guys have some suggestions I'd appreciate.

Thanks

Upvotes: 1

Views: 13916

Answers (2)

RpBarros
RpBarros

Reputation: 21

Someone helped me. I guess Im gonna have to do it programmatically.

This might help someone else in the future.Here's the link:

http://forums.xamarin.com/discussion/2784/best-way-to-support-540x960-and-480x800-both-hdpi

Upvotes: 0

Codeman
Codeman

Reputation: 12375

One of the best ways to handle this is by using a 9patch, rather than a bitmap.

The 9patch will "fill" to any size with accurate pixels, if done correctly.

There's a great tool by Google that helps generate 9patches here

(This is assuming you're talking about a standard layout. If you're doing OGL or something like that, it's a whole different can of worms)

Upvotes: 1

Related Questions