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 lblTest As Label
Dim currentAngle As Float
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("Layout1")
lblTest.Initialize("lblTest")
Activity.AddView(lblTest, 100dip, 100dip, 200dip, 50dip)
lblTest.Color = Colors.red
currentAngle = 0
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub lblTest_Click
Dim r As Reflector
r.Target = lblTest
currentAngle = currentAngle + 30
r.RunMethod2("setRotation", currentAngle, "java.lang.float")
End Sub
Dim obj1 As Reflector
obj1.Target = edt
obj1.RunMethod2("setFocusable", "False", "java.lang.boolean")
Because the "setFocusable" method needs a boolean variable.Please to expand explained me that Why do we must use the "java.lang.boolean"
The link in info points to the help for the View object.... I see from this info.
Dim obj1 as Reflector
obj1.Target=editText1
obj1.RunMethod2("SetBackgroundColor",Colors.red,"java.lang.int")
Sub CheckNotificationSetting
Dim RingerMode As Int
Dim Target As Object
Dim r As Reflector
r.Target = "android.media.AudioManager"
Log("r.Target: " & r.Target)
RingerMode = r.RunMethod("getRingerMode")
'RingerMode = r.RunStaticMethod("android.media.AudioManager","getRingerMode",Null,Null)
Log("RingerMode in CheckNotificationSetting: " & RingerMode)
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?