Android - open native sized display

Discuss any general programming issues here
Post Reply
rednight
Posts: 6
Joined: Fri Sep 25, 2015 4:41 am

Android - open native sized display

Post by rednight » Sun May 22, 2016 10:03 am

So how can I open a display of native size and determine what that size is?

User avatar
airsoftsoftwair
Posts: 3075
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Android - open native sized display

Post by airsoftsoftwair » Sun May 22, 2016 11:22 am

What about

Code: Select all

w = GetAttribute(#DISPLAY, 0, #ATTRHOSTWIDTH)
h = GetAttribute(#DISPLAY, 0, #ATTRHOSTHEIGHT)
ChangeDisplaySize(w, h)
Alternatively, you could also create a BGPic of that size and show it using DisplayBGPic().

rednight
Posts: 6
Joined: Fri Sep 25, 2015 4:41 am

Re: Android - open native sized display

Post by rednight » Sun May 22, 2016 9:53 pm

That works fine on computer, but doesn't seem to work on Android. Isn't ChangeDisplay on the list of functions that don't work with Droid?

User avatar
airsoftsoftwair
Posts: 3075
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Android - open native sized display

Post by airsoftsoftwair » Sun May 22, 2016 11:31 pm

Looking at the source code, ChangeDisplaySize() should work on Android. What behaviour do you get? Does it fail with an error message?

An alternative could be to use a BGPic:

Code: Select all

w = GetAttribute(#DISPLAY, 0, #ATTRHOSTWIDTH)
h = GetAttribute(#DISPLAY, 0, #ATTRHOSTHEIGHT)
CreateBGPic(1, w, h)
DisplayBGPic(1)

rednight
Posts: 6
Joined: Fri Sep 25, 2015 4:41 am

Re: Android - open native sized display

Post by rednight » Mon May 23, 2016 6:06 am

I figured it out -- it actually did work just the title was covering up the textout with the screen dimedndions in it.

Post Reply