Some people just have weird ideas and making Basic4Android could be categorized as one of those.
Yes it let’s you create android applications using Basic. And how could I pass that up. So I installed the trail version and gave it a spin.
So I tried to make a textview that I would change to hello world when the application starts.
First thing you get to see when is this screen.
I guess that if you want to use it for real you should buy it.
Then I clicked on designer and was greeted with these two windows.
And as you can see I added a label, yeah that’s what they call a TextView.
And then I changed the code to this.
'Activity module
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
Dim label1 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
label1.Text = "Hello world"
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
you declare your views in global and you just give them the same name as you used in your layout and things are supposed to work.
Then you load the layout in your create method and change the text of the label.
After that you run it by clicking, uhm, run. And you will see that it starts converting your code to Java code. But first you open an emulator with the AVD manager.
And does it work you ask?
Yes of course it does.
Now the question is, would I ever use this…. No. But it’s fun to see what people think of.