Android Question Dim vs Private

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

I'm confused between using Dim vs Private to declare library objects, views and variables. Can you look at my code and let me know which one is best to use (Dim vs Private)?

When I use the "Generate" menu item from the designer it creates Private objects in the Globals sub.

B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    ' Library objects.
    '-----------------
    Dim startapp As startAppInAppPlus
    Private sf As StringFunctions
   
    ' View objects.
    '--------------
    Private PanelMenu As Panel
    Private ImageViewSettings As ImageView
    Private ImageViewEnable As ImageView
    Private ImageViewDisable As ImageView
    Private ImageViewExit As ImageView
End Sub
 
Top