Online documentation

Erel

Administrator
Staff member
Licensed User
You can see a draft version of the online documentation here:
Basic4android - Android programming with Gui designer

The complete documentation will be ready in a few days. You can however see the general idea.

Note that the menu on the first page will take you to pages that not yet exist...

I'm very pleased with the whole documentation process in Basic4android. The results of this process appear in two places, inside the IDE and in the online documentation. I hope you will like it as well :)
 

susu

Well-Known Member
Licensed User
Yeah! That all I wish for Christmas :sign0060:
 

Cableguy

Expert
Licensed User
Mop,....nop....I don't like it....I really don't....what can I do?...

I just....Loved it!!!!
 

BPak

Active Member
Licensed User
Like it.

Very clear and easy to read with good color plan.

Will make coding more fun with good reference like this.
 

BPak

Active Member
Licensed User
Image change - Installing Basic4android and Android SDK

The image for Paths Configure needs to be changed as it now has 'Additional Libraries' entry.
 

BPak

Active Member
Licensed User
In Guess my number - Visual designer & Events

OPTIONAL WORDING ?

Therefore nothing bad will happen if the emulator crashes or is turned off.

Using Add View menu add a Button, an EditText and a Label.
( Use the Add View menu to add a Button, an EditText and a Label. )

Once you saved a layout, it is automatically gets added to the "File manager".
( Once you have saved a layout, it automatically gets added to the "File manager". )
( Once you have saved a layout, it is automatically added to the "File manager". )
 

BPak

Active Member
Licensed User
In IDE Tips

Nothing will happened if you select an existing item (there will be no duplicated code).

Nothing will happen if you select an existing item (there will be no duplicated code).

OPTIONAL -

Background compilation - Pressing Alt + 3 will compile and install your application while keeping the IDE responsive. The status bar at the bottom of the screen will update you when the installation completed.
Background compilation - Pressing Alt + 3 will compile and install your application while keeping the IDE responsive. The status bar at the bottom of the screen displays the progress of the process and when the installation is completed.

Working with multiple connected devices -
... This is usually more convenient than compiling in the foreground and selecting the target device each time.

Clean Project / Clean Unused Files -
... (and allows you to cancel the operation).
 

BPak

Active Member
Licensed User
In Android Process and activities life cycle

Each Basic4android program runs in its own process.

OPTIONAL -
It will happen sometime after the user or system has closed all the activities.

Once the sub ends these variables no longer exist.

Activity variables - These variables are contained by the activity.
You should declare these variables inside Sub Globals.
These variables are "private" and can only be accessed from the current activity module.
All objects types can be declared as activity variables.
Every time the activity is created, Sub Globals is called (before Activity_Create).
These variables exist as long as the activity exists.

Sub Activity_Create (FirstTime As Boolean) -
... You can use FirstTime to run all kinds of initializations related to the process variables.
 

BPak

Active Member
Licensed User
In Currency Converter - Http web services and more

File.GetLines is in the article and in the code.

File.GetLines(File.DirAssets, "CountryCodes.txt", countries)

----------------------------------------------------------

countries = File.ReadList(File.DirAssets, "CountryCodes.txt")
 

BPak

Active Member
Licensed User
In Core Library

Type
Declares a structure.
Can only be used inside sub Globals or sub Process_Globals.
Syntax:
Type type-name (field1, field2, ...)
Fields include name and type.
Example:
Type MyType (Name As String, Items(10) As Int)
Dim a, b As MyType
a.Items(2) = "very interesting item"
I put this example code in the IDE and tried to run it but there are errors displayed in the emulator.

First error was Null Pointer. Put in a.Initialize and that was then OK.
Next error was Number Format Exception.
changed a.Items(2) = "very interesting item"
to a.Items(2) = 358 and then it worked.
Type has Items defined as an Int!

B4X:
   Dim a, b As MyType
   a.Initialize
   a.Items(1) = 163
   a.Items(2) = 285
 

BPak

Active Member
Licensed User
Loading a typeface from Assets

Compiling code. Error
Error parsing program.
Error description: Unknown type: _c
Are you missing a library reference?
Occurred on line: 16
Dim MyFont As Typeface
B4X:
Dim MyFont As Typeface
   MyFont = Typeface.LoadFromAssets("MarketingScript.ttf")
   EditText1.Typeface = MyFont
 
Top