I think the phone uses the layout-hdpi file but this doesn't seem right, mostly because its dimensions(540 x 960) are not what I'm used to seeing(480 x 800) for layout-hdpi phones. So what is the actually layout file used? Also, if it is layout-hdpi phone how can I stretch an icon that has a width of 480 to 540? Would I programmatically have to test the phone's dimensions and then expand the drawable-hdpi file to fit the various device dimensions? I looked at this link but they never specified what layout file was used.
Asked
Active
Viewed 688 times
1 Answers
2
Yes, HTC Evo 3d use drawable-hdpi images. You should have to put the Layout file also. Put the same file into layout-hdpi.
Now create the Emulator of the Resolution 540 X 960. And test the App in it. There should be minor difference between normal hdpi and HTC Evo Screen resolution. Manualy test it.
I am getting same trouble before some days. What i have done is: I am going to check the resolution of the devide screen size at run time. And if the Resolution is compare to that HTC Evo 3d then it will set the height and Width of the All Images at run time that fit to the HTC Screen Resolution.
That was the Best Solution i found till today to Make app for HTC Evo 3d.
For Checking the Resolution at run-time you can use this:
Display display = getWindowManager().getDefaultDisplay();
DisplayMetrics dm = new DisplayMetrics();
display.getMetrics(dm);
int width = display.getWidth();
int height = display.getHeight();
if((height==960) && (width == 540)){
// Do change the Image Height or Width or position
}
Enjoy. :)

Shreyash Mahajan
- 23,386
- 35
- 116
- 188
-
see Update for the Code to check for the Display. – Shreyash Mahajan Apr 25 '12 at 04:36
-
Good call sir, that is a good way to specify attributes for an exact configuration. – thomas.cloud May 01 '12 at 18:23
-
@ iDroid Explorer: I need a reputation of 15 to upvote, I only have a rep 5 currently, sorry. – thomas.cloud May 02 '12 at 16:06
-
keep answering to questions on SO which will help to improve your knowledge and become one kind of help to other. – Shreyash Mahajan Dec 21 '12 at 03:47