iOS Code Snippet Differences between B4A and B4i

Discussion in 'iOS Code Snippets' started by Mashiane, May 28, 2015.

  1. Mashiane

    Mashiane Expert Licensed User

    This section will be a record of all the differences between b4a and b4i for future use. This has been sourced from questions asked.

    1. b4a - Activity_Resume: b4i - Page_Appear
    2. iTableView / ListView : in b4i if you are loading dynamic items, run the .ReloadAll method to refresh your listview contents
     
    Last edited: Jun 5, 2015
  2. ilan

    ilan Expert Licensed User

    B4a -> B4i

    Activity_Resume -> Application_Active
    Activity_Pause -> Application_Inactive
     
    Daniel-White likes this.
  3. Mashiane

    Mashiane Expert Licensed User

    b4i does not have this method yet for the ListView, here is an adoption:
    Usage: AddTwoLinesAndBitMap2(iTableViewID, Title, Description, LoadBitMap(), key)

    The b4a has this method built in for it.

    Code:
    Public Sub AddTwoLinesAndBitmap2(LV As TableView, sTitle As String, sDescription As String, img As Bitmap, sKey As String)
        
    Dim tc As TableCell = LV.AddTwoLines(sTitle, sDescription)
        tc.Bitmap = img
        tc.Tag = sKey
    End Sub
     
  4. Mashiane

    Mashiane Expert Licensed User

    Another listview method adoption:

    Code:
    Public Sub AddSingleLineAndBitmap2(LV As TableView, sTitle As String, img As Bitmap, sKey As String)
        
    Dim tc As TableCell = LV.AddTwoLines(sTitle, "")
        tc.Bitmap = img
        tc.Tag = sKey
    End Sub
     
  5. Mashiane

    Mashiane Expert Licensed User

    Another...

    Code:
    Public Sub AddTwoLines2(LV As TableView, sTitle As String, sDescription As String, sKey As String)
        
    Dim tc As TableCell = LV.AddTwoLines(sTitle, sDescription)
        tc.Tag = sKey
    End Sub
     
  6. Mashiane

    Mashiane Expert Licensed User

    Code:
    Public Sub AddSingleLine2(LV As TableView, sTitle As String, sKey As String)
        
    Dim tc As TableCell = LV.AddTwoLines(sTitle, "")
        tc.Tag = sKey
    End Sub
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice