Android App Orientation [fixed]

Just starting out? Need help? Post your questions and find answers here.
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

Android App Orientation [fixed]

Post by IdeasVacuum »

The orientation option 'Landscape' in Create App/Android does not work for me - anyone else have this issue?

Code: Select all

EnableExplicit
CloseDebugOutput()
ExamineDesktops()

#Desktop = 0

Enumeration
#Win
#Btn1
#Btn2
#Btn3
#BtnExit
#Scroll
#Msg
#Txt
EndEnumeration

Global igAvailW.i, igAvailH.i, igWinH.i, igWinW.i

;!igAvailW = window.screen.availWidth
;!igAvailH = window.screen.availHeight
;!igWinW = window.screen.width
;!igWinH = window.screen.height

igWinW = DesktopWidth(#Desktop)
igWinH = DesktopHeight(#Desktop)

;Debug igAvailW
;Debug igAvailH
;Debug igWinW
;Debug igWinH

Procedure CloseWindowEvent()
;#---------------------------
  CloseWindow(EventWindow()) ; Close the specific window
EndProcedure

Procedure MyGadgetEvent()
;#------------------------
    SetGadgetText(#Msg, "Button" + Str(EventGadget()) + " pressed!")
EndProcedure
 

  If OpenWindow(#Win, 0, 0, igWinW, igWinH, "", #PB_Window_BorderLess|#PB_Window_SizeGadget|#PB_Window_ScreenCentered)

    ScrollAreaGadget(#Scroll,   0,   0, 300, 250, 500, 300, 40)
        ButtonGadget(#Btn1,    10,  10, 255,  38,"Button 1")
        ButtonGadget(#Btn2,    10,  50, 255,  38,"Button 2")
        ButtonGadget(#Btn3,    10,  90, 255,  38,"Button 3")
        ButtonGadget(#BtnExit, 10, 130, 255,  38,"Exit")
          TextGadget(#Msg,     10, 180, 255,  26, "", #PB_Text_Center | #PB_Text_Border)
          TextGadget(#Txt,    200, 210, 230,  26, "Scroll to see all of the Text Here", #PB_Text_Right | #PB_Text_Border)

           BindEvent(#PB_Event_Gadget, @MyGadgetEvent(), #Win, #Btn1)
           BindEvent(#PB_Event_Gadget, @MyGadgetEvent(), #Win, #Btn2)
           BindEvent(#PB_Event_Gadget, @MyGadgetEvent(), #Win, #Btn3)
           BindEvent(#PB_Event_Gadget, @CloseWindowEvent(), #Win, #BtnExit)

     CloseGadgetList()
  EndIf
Last edited by IdeasVacuum on Sat Jun 10, 2017 11:54 pm, edited 1 time in total.
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Android App Orientation

Post by falsam »

[SB 2.00] No problem for me : Landscape mode is blocked.

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

Re: Android App Orientation

Post by IdeasVacuum »

Hi Falsam
Landscape mode is blocked
I have no idea what that means :?
falsam
Posts: 280
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Android App Orientation

Post by falsam »

IdeasVacuum wrote:The orientation option 'Landscape' in Create App/Android does not work for me
I did a test. I chose Landscape in Create App / Android and my application is in landscape mode.

➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
http://falsam.com

Sorry for my poor english
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

Re: Android App Orientation

Post by IdeasVacuum »

Well, really strange. Before, orientation did not work at all. Now, it works every time! :shock:
There must be something alien in the coffee....
Post Reply