-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFbar.b4a
97 lines (83 loc) · 3.6 KB
/
Fbar.b4a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Build1=Default,b4a.example
File1=icons8-add-96.png
File10=icons8-search-96.png
File11=icons8-trash-96.png
File12=icons8-view-96.png
File13=Main.bal
File2=icons8-add-file-96.png
File3=icons8-checkmark-96.png
File4=icons8-database-view-96.png
File5=icons8-delete-96.png
File6=icons8-downloading-updates-96.png
File7=icons8-left-96.png
File8=icons8-password-1-96.png
File9=icons8-save-96.png
FileGroup1=Default Group
FileGroup10=Default Group
FileGroup11=Default Group
FileGroup12=Default Group
FileGroup13=Default Group
FileGroup2=Default Group
FileGroup3=Default Group
FileGroup4=Default Group
FileGroup5=Default Group
FileGroup6=Default Group
FileGroup7=Default Group
FileGroup8=Default Group
FileGroup9=Default Group
Group=Default Group
IconFile=
Library1=core
Library2=imageprocessing
Library3=javaobject
ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>~\n~<supports-screens android:largeScreens="true" ~\n~ android:normalScreens="true" ~\n~ android:smallScreens="true" ~\n~ android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~CreateResourceFromFile(Macro, Themes.DarkTheme)~\n~'End of default text.~\n~
Module1=Starter
Module2=Fbar
NumberOfFiles=13
NumberOfLibraries=3
NumberOfModules=2
Version=8.3
@EndOfDesignText@
#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
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
' Public Newbtn, SearchBtn, Search2Btn, SaveBtn, DeleteBtn, DownBtn, DBBtn, KeyBtn As Button
' Public AllBtns() As Button : AllBtns = Array As Button(Newbtn, SearchBtn, Search2Btn, KeyBtn, DownBtn, DBBtn, DeleteBtn, SaveBtn)
' Public AllNames() As String : AllNames = Array As String("New", "Search", "Search2", "Pass", "Down", "DB", "Del", "Save")
' Public AllIcons() As String : AllIcons = Array As String("icons8-add-file-96.png", "icons8-search-96.png", "icons8-view-96.png", "icons8-password-1-96.png", "icons8-database-view-96.png", "icons8-downloading-updates-96.png", "icons8-delete-96.png", "icons8-save-96.png")
Public AllNames() As String : AllNames = Array As String("New", "Search")
Public AllIcons() As String : AllIcons = Array As String("icons8-add-file-96.png", "icons8-search-96.png")
Private Fbar1 As Fbar
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Dim AllBPM(8) As Bitmap
For i=0 To AllIcons.Length-1
AllBPM(i) = LoadBitmap(File.DirAssets, AllIcons(i))
Next
Activity.LoadLayout("Main.bal")
Fbar1.CreateButtons(AllNames, AllBPM)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Fbar1_ButtonClick (Tag As String)
ToastMessageShow("Button " & Tag & " pressed", False)
End Sub