#Region Project Attributes
#ApplicationLabel: BarcodeGenerator
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#AdditionalJar: core-3.2.1
#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.
Dim qr As QRcode
Dim ac As AztecCode
Dim dm As DataMatrix
Dim pdf As PDF417
Dim c128 As Code128
Dim ean_8 As EAN8
Dim ean_13 As EAN13
Dim c39 As Code39
Dim itfc As ITF
Dim cb As Codabar
Dim bm As Bitmap
Private ivqr As ImageView
Private ivac As ImageView
Private ivdm As ImageView
Private ivpdf As ImageView
Private ivc128 As ImageView
Private ivean8 As ImageView
Private ivean13 As ImageView
Private ivc39 As ImageView
Private ivitf As ImageView
Private ivcb As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
ac.Initialize
qr.Initialize
dm.Initialize
pdf.Initialize
c128.Initialize
ean_8.Initialize
ean_13.Initialize
c39.Initialize
itfc.Initialize
cb.Initialize
bm = qr.drawQRCode("B4A is a great tool that can be used for the development of Android apps.")
ivqr.Bitmap = bm
bm = ac.drawAztecCode("B4A is a great tool that can be used for the development of Android apps.")
ivac.Bitmap = bm
bm = dm.drawDataMatrixCode("B4A is a great tool that can be used for the development of Android apps.")
ivdm.Bitmap = bm
bm = pdf.drawPDF417("B4A is a great tool that can be used for the development of Android apps.")
ivpdf.Bitmap = bm
bm = c128.drawCode128("123456789")
ivc128.Bitmap = bm
bm = ean_8.drawEAN8("1234567") 'Pass only first 7 digits - the checksum will be calculated in class EAN8
ivean8.Bitmap = bm
bm = ean_13.drawEAN13("600106035982") 'Pass only first 12 digits - the checksum will be calculated in class EAN13
ivean13.Bitmap = bm
bm = c39.drawCode39("60010")
ivc39.Bitmap = bm
bm = itfc.drawCodeITF("51834653") 'Number of digits must be even and at least 6 digits long
ivitf.Bitmap = bm
bm = cb.drawCodabar("35754262")
ivcb.Bitmap = bm
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub