android - AVD resolution issue with my app -


i'm writing android app android tablets, tablet 10.1" 600x1024 archos tablet running android 2.2

when throw app device works fine, no problems @ all, when throw avd (600x1024, tested 120, 160, 240 , 320 dpi) ever open in small area of display. screen shows 600x1024 screen , standard android desktop shows fine, app display in 480x320 box in middle of screen.

an example: avd running desktop - http://www.flickr.com/photos/45270706@n03/5960464995/

and running app - http://www.flickr.com/photos/45270706@n03/5961001468/

as can see, app believes screen size 480x320 - code used display text is:

canvas.drawtext("screen width = " + canvas.getwidth(), 50, 20, paint); canvas.drawtext("screen height = " + canvas.getheight(), 50, 40, paint); 

which should accurate enough.

i'm either doing wrong in code (which don't think new 'hello world' same), doing wrond when setting avd (though same if use galaxytab avd) or don't know else.

i've had around @ existing threads don't seem cover issue i'm having.

if makes difference, i'm using netbeans , nbandroid ide.

any appreciated , happily provide of code if resolve issue.

thanks in advance.

in androidmanifest.xml should make sure have enabled support possible screen sizes , targeting above version 3 (usually idea target maximum sdk version , support lowest possible api calls)

  ...    <uses-sdk android:minsdkversion="3" android:targetsdkversion="11"/>    <supports-screens       android:xlargescreens="true"       android:largescreens="true"       android:normalscreens="true"       android:smallscreens="true"       android:anydensity="true" />  </manifest>  

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -