Tutorials & Examples

Android development starts here. Please do not post questions in this sub-forum.

[B4X] I need 100 <custom view here>s. How to add programmatically?

Custom views are designed to be added with the designer.

It is however very simple to create a layout file with the custom view and load it multiple times...
 

[B4X] How to get <custom view here> from <CLV or any other container>

This is a common question and for a good reason.

Custom views classes are not views by themselves.
The views tree only holds views.
This means that this code cannot work:
B4X:
Dim...
 
Last edited:

[B4X] Text, Strings and Parsers

This guide is relevant for B4A, B4i and B4J.

There are all kinds of tools and libraries available for the different text based formats. The purpose of this guide is to organize the available...
 
Last edited:

RippleView

The attached project comes from here (I have conducted some open heart surgery on it). It is working perfectly on my 7" tablet but on my Samsung S4 mini, unlike what is the case on my...
 

Attachments

  • b4aRippleView.zip
    38.2 KB · Views: 1,170
  • JavaCode.zip
    145.6 KB · Views: 1,044
Last edited:

How to connect to SQL Server using jtds-1.3.1.jar

This subject keeps coming up so I thought I would do a tutorial and sample programs. One is B4A, the other is B4J. If you want code examples download the programs.

The B4J I created for testing...
 

Attachments

  • SQLTestB4A.zip
    8.6 KB · Views: 1,324
  • SQLTestB4J.zip
    3.3 KB · Views: 982
Last edited:

RTL Layout Support

1.Declare in your app manifest that your app supports RTL mirroring.
Specifically, add below code in your manifest.
B4X:
SetApplicationAttribute (android:supportsRtl, true)

2. Copy the code you...
 
Last edited:

Complete tutorial: B4A & Your own (local) php & MySql Server (Xampp) with b4a

Update:

Newer releases of XAMPP come with MariaDB except of MySQL. Basically the same but the php scripts have to be changed a little bit:

- mysql is changed to mysqli
- "$con"...
 

Attachments

  • Example_B4A_APP_Xampp.zip
    9.7 KB · Views: 4,553
  • persons.zip
    582 bytes · Views: 3,998
Last edited:

COVID API

API for live information about COVID-19

##source##


B4X:
Sub covid

    Dim cov1 As HttpJob
    cov1.Initialize("GetAddress", Me)...
 

Attachments

  • cov.zip
    14.1 KB · Views: 696
  • Screenshot_1584876341.png
    Screenshot_1584876341.png
    8.4 KB · Views: 871
  • Screenshot_1584876347.png
    Screenshot_1584876347.png
    10.4 KB · Views: 925
  • Screenshot_1584895171.png
    Screenshot_1584895171.png
    18.2 KB · Views: 878
Last edited:

[B4X] Manage your own Let´s Encrypt Certificates (ACME Client)

While looking around on interesting projects to wrap i found a java console app (jar file) which is able to create and manage Certificates which can be used in your Server.
It manages Let´s...
 

B4A on Kindle Fire & Amazon App Store Tutorial

* * * B4A on the Kindle Fire Device * * *

This tutorial is being written to help notify/guide B4A users of known issues that have been found using B4A with the kindle fire device and some...
 
Last edited:

[B4X] Net library (FTP, SMTP, POP) with Wait For

Starting from v1.70 of Net, jNet and iNet libraries the asynchronous methods return a 'sender filter' object.
This object can be passed as the sender filter parameter in a Wait For call.
This...
 
Last edited:

Create an Android virtual machine or laptop

Hey everyone,

I just came across this video and I thought I should share it with you:

 

[B4X] B4XTable - Setting cell (default label) properties

Last edited:

Youtube playlist with xml2map

hi..
I prepared the youtube playlist using the examples in the forum.

Used libraries:
➡ Javaobject
➡ Labelextras
➡ Okhttputils2
➡ Snyoutube
➡ Stringutils
➡ Xcustomlistview
➡ Xml2map
➡ Xmlbuilder...
 

Attachments

  • 1.jpg
    1.jpg
    7.2 KB · Views: 780
  • 3.jpg
    3.jpg
    44.3 KB · Views: 793
  • 2.jpg
    2.jpg
    18.3 KB · Views: 786
Last edited:

[B4X] Nested layouts

1587290214570.png


Lets say that we want to build a layout such as the above where the screen is split into two halves.

If we try to build this layout with a single layout file we will quickly meet a...
 

Attachments

  • NestedLayouts.zip
    12.8 KB · Views: 760

[Tip] Reset the manifest editor code to the default code

Use case: you downloaded an old example and you want to reset the manifest editor code so it will have the correct targetSdkVersion and theme.

Open the manifest editor, delete all text and save...
 

[B4X] [XUI] Drawing with B4XCanvas

B4XCanvas is the cross platform version of Canvas.

Steps to using B4XCanvas:

1. Initialize and pass the target view. In most cases it will be a Panel (or Pane). It must be a Pane in B4J.
2. Make...
 

Attachments

  • xSmiley_B4A.zip
    10.8 KB · Views: 1,350
  • xSmiley_B4i.zip
    5.3 KB · Views: 843
  • xSmiley_B4J.zip
    5 KB · Views: 1,060
Last edited:

TabStripViewPager - Better ViewPager

Attachments

  • TabStripExample.zip
    10.9 KB · Views: 4,006
  • TabStripViewPager_Library.zip
    30.5 KB · Views: 3,188
Last edited:

ContentChooser Example (select image at phone)

Here is a ContentChooser Example project to choose a image at phone for use in a activity with image view. it works with B4A 9.x and Android 8.1...
 

Attachments

  • ContentChooser Example.zip
    9.4 KB · Views: 3,083
Last edited:

Free Mini Course Android Development Environment Preparation (B4A)

Good morning,
I'd like to share the free "Android Development Environment Preparation" course.
This course helps prepare the B4A development environment to start developing Android apps.
I thank...
 
Top