-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathElegirPictograma.bas
68 lines (55 loc) · 1.69 KB
/
ElegirPictograma.bas
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
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Activity
Version=8
@EndOfDesignText@
#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#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 ListaPictogramas As ListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim fileList As List
Dim file1 As String
Dim file2 As String
Dim n As Int
ListaPictogramas.Initialize("ListaPictogramas")
ListaPictogramas.Color=Colors.LightGray
ListaPictogramas.TwoLinesAndBitmap.Label.TextColor=Colors.Black
ListaPictogramas.Padding=Array As Int(5dip,5dip,5dip,5dip)
ListaPictogramas.FastScrollEnabled = True
fileList = File.ListFiles(File.DirAssets)
fileList.Sort(True)
For n = 0 To fileList.Size-1
file1 = fileList.Get(n)
If file1.Contains(".png") Then
file2=file1.Replace(".png","")
Dim Bitmap1 As Bitmap
Bitmap1.Initialize(File.DirAssets, file1)
ListaPictogramas.AddTwoLinesAndBitmap(file2,"",Bitmap1)
End If
Next
End Sub
Sub MostrarListaPictogramas(Seleccionado As String)
Starter.PictogramaSeleccionado=""
Activity.AddView(ListaPictogramas, 5dip, 5dip, 100%X-10dip, 100%Y-10dip)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub ListaPictogramas_ItemClick (Position As Int, Value As Object)
Starter.PictogramaSeleccionado=Value
ListaPictogramas.RemoveView
CallSubDelayed(ConfigurarSecuencia,"ConfigPictograma_Actualizar")
Activity.Finish
End Sub