iOS Question Can not add Layout to scrollview

nazilabdulla

Member
Licensed User
Longtime User
B4X:
Sub Class_Globals

    Private SVBack As ScrollView
End Sub

'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize

    SVBack.Initialize("SVBack",Main.MWidth,Main.MHeight)
    SVBack.Color=Colors.Red

End Sub
Public Sub AddToActivity(ACT As Page)
    Try
       
        SVBack.Visible = True

        ACT.RootPanel.AddView(SVBack,0%x,0%y,ACT.RootPanel.Width,ACT.RootPanel.Height)
        ACT.Title = "Check Out"
        Main.NavControl.ShowPage(ACT)
        SVBack.BringToFront
   
        SVBack.Panel.LoadLayout("CheckOutHead")
   
   
   
    Catch
        Log(LastException)
    End Try
End Sub


is there any error in above code ? CheckOutHead is the Layout file,Main.MWidth is declared and assigned in Main page.
I face 2 problem

1. One first call SVBack is not coming, But next call
 

nazilabdulla

Member
Licensed User
Longtime User
B4X:
Sub Class_Globals

    Private SVBack As ScrollView
End Sub

'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize

    SVBack.Initialize("SVBack",Main.MWidth,Main.MHeight)
    SVBack.Color=Colors.Red

End Sub
Public Sub AddToActivity(ACT As Page)
    Try
      
        SVBack.Visible = True

        ACT.RootPanel.AddView(SVBack,0%x,0%y,ACT.RootPanel.Width,ACT.RootPanel.Height)
        ACT.Title = "Check Out"
        Main.NavControl.ShowPage(ACT)
        SVBack.BringToFront
  
        SVBack.Panel.LoadLayout("CheckOutHead")
  
  
  
    Catch
        Log(LastException)
    End Try
End Sub


is there any error in above code ? CheckOutHead is the Layout file,Main.MWidth is declared and assigned in Main page.
I face 2 problem

1. One first call SVBack is not coming, But next call

Next call it is coming.

2. CheckOutHead layout not at all loding..
 
Upvote 0
Top