1

(I searched quite a lot here on stackoverflow but could not find the answer)

My game is a tablet-only game and so far I got the interface to fit on a

  • 1024x600 7" tablet mdpi (ex: HTC Flyer)
  • 1280x800 10.1" tablet mdpi(ex:Acer A500)
  • Nexus 7" v2 xhdpi
  • Nexus 7" tvdpi

I thought I was near the end but today I had the chance to quickly try it on a Galaxy Tab 3 and the main image on the main layout was stretched and probably didn't use the right resource (I expected it to use the mdpi one as it's a 7" 1024x600 tablet). I read somewhere that the Galaxy tab would be using the hdpi resource. I made some changes and I would like to test it but unfortunately I no longer have access to the tablet.

I installed the Samsung emulator but it targets android 2.2 so I can't run my app on it.

I then tried to create a new definition by specifying 1024x600, Large and HDPI but then the game would crash because the game is checking some values on startup and it could not find the values-large-hdpi folder . Of course I could create the folder/values but on the other hand it was not crashing on the actual tablet so I'm not sure it's the right idea.

So how do you create an AVD that acts like the Galaxy Tab 3 on Android 4.+ ?

Jim S
  • 427
  • 1
  • 6
  • 12
  • 1
    FWIW, my GTab II 7" returns mdpi, large, 1024x600. The original GTab was configured incorrectly, returning a "normal" screen at mdpi. If a 7" screen with 1024x600 returns a pixel density other than mdpi, that is incorrect. Is it possible that you have competing resources (i.e. a sw###dp or large/normal)? – 323go Oct 16 '13 at 16:33
  • Well, that's strange considering that I have a 1024x600 mdpi tablet (htc flyer) and everything looks fine on it but it looks incorrect on the Gtab 3. I have mdpi, tvdpi and xhdpi resources. Looks like it did not use the mdpi resources because the image was bigger than on my htc flyer, overlapping some other components. – Jim S Oct 16 '13 at 16:59
  • 1
    Could be the difference between hardware buttons and soft buttons. – 323go Oct 16 '13 at 17:01
  • You may be onto something. I know for a fact that when I tried the app last week on that tablet it didn't have the navigation bar and it had the top notification bar. I added code to hide the notification bar and force the display of the navigation bar. I know that when I tried it yesterday, the notification bar was gone but I forgot to check if the navigation bar was really there. Maybe my code to force the display of the navigation bar didn't work. It's why an emulator would be great to test this . – Jim S Oct 16 '13 at 17:12
  • Ok I called the person with the GTAB and I can confirm that the problem is indeed the hardware buttons. My code to display the navigation bar didn't work. So basically it answers my question. I'll emulate a 1024x600 mdpi tablet with hardware buttons and test my code. Thanks a lot ! – Jim S Oct 16 '13 at 17:26
  • That's great news. Glad I could help! – 323go Oct 16 '13 at 18:10

0 Answers0