I have used some code from Markus in another thread because it is a good demonstration of this problem.
On Android, getDeviceHeight adds 24 pixels to the actual height. In the code below you will see the render target uses this height, and the drawn circle is missing the top and bottom. The circle is supposed to be the exact height of the screen.
REM AGK v2.0.14b
REM MR
SetWindowSize(1280,720,0)
SetTransitionMode(0)
SetOrientationAllowed(0,0,1,1)
sync()
w#=GetDeviceWidth()
h#=GetDeviceheight()
r#= ( w# / h# )
SetVirtualResolution(100.0*r#,100.0)
SetDisplayAspect(r#)
imgrender=CreateRenderImage( GetVirtualWidth()*5.0,GetVirtualHeight()*5.0, 0, 1 )
sprrender=createsprite(imgrender)
setspritesize(sprrender,50,-1)
SetSpritePosition(sprrender,GetVirtualWidth()-10-GetSpriteWidth(sprrender),10)
SetClearColor(32,32,32)
Black=makecolor(0,128,0)
White=makecolor(255,255,255)
do
p("GetDeviceWidth",str(GetDeviceWidth()))
p("GetDeviceheight",str(GetDeviceheight()))
p("GetVirtualWidth",str(GetVirtualWidth()))
p("GetVirtualHeight",str(GetVirtualHeight()))
p("w#",str(w#,0))
p("h#",str(h#,0))
p("r#",str(r#,2))
if 1=1
SetRenderToImage( imgrender, 0 )
ClearScreen()
DrawBox(0,0,GetVirtualWidth(),GetVirtualHeight(),Black,Black,Black,Black,1)
Grid()
radius#=50.0 // GetVirtualHeight()/2.0*0.5
DrawEllipse(GetVirtualWidth()/2.0,GetVirtualHeight()/2.0,radius#,radius#,White,White,1)
Render()
SetRenderToScreen()
endif
if GetPointerPressed() then exit
sync()
loop
end
function p(d$,v$)
print(d$ + " : " + v$)
endfunction
function Grid()
Yellow=MakeColor(255,255,0)
mx#=GetVirtualWidth()/2.0
my#=GetVirtualHeight()/2.0
for x#=mx#-mx# to mx#+mx# step 10.0
DrawLine(x#,0,x#,GetVirtualHeight(),Yellow,Yellow)
next
for y#=my#-my# to my#+my# step 10.0
DrawLine(0,y#,GetVirtualWidth(),y#,Yellow,Yellow)
next
endfunction