Android Question Label1.SetLayout

HarryPottier

Member
Licensed User
I'm failing at the simple things
I would like to display 4 labels of the same size
the error occurs with Label1.SetLayout
what did I overlook or do wrong ?

B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    
End Sub

Sub Globals
    
    Dim Label1 As Label
    Dim Label2 As Label
    Dim Label3 As Label
    Dim Label4 As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
    
    Label1.SetLayout(0,0,50%x,50%y)
    Label2.SetLayout(0,50%y,50%x,50%y)
    Label3.SetLayout(50%x,50%y,50%x,50%y)
    Label4.SetLayout(50%x,50%y,50%x,50%y)
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…