Tutorials & Examples

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

[B4X] Documentation Booklets

The B4X documentation booklets are available in PDF format, Download Link.
All files are included in the zip file in the link above, pdf booklets and all the source code.

You can also...
 
Last edited:

[B4X] Features that Erel recommends to avoid

Many things have changed in B4X and also in the underlying platforms. I will try to list here all kinds of (old) features that have better alternatives.
B4X is backward compatible so these...
 
Last edited:

[B4X] "Code Smells" - common mistakes and other tips

"Code smells" are common patterns that can indicate that there is a problem in the code. A problem doesn't mean that the code doesn't work, it might be that it will be difficult to maintain it or...
 
Last edited:

B4Xgoodies_from_walt61 Online

Well,

As JamesGreaves requested,
"So do you not think it would be of value to have even something like @walt61 has created but online?"...
 
Last edited:

"Stick Header" CLV Demo

A demonstration of using a "Stick Header" (Floating Title)...

With Erel's help HERE, I was able to create my version of a "floating title", as Erel has coined it.

If you use ChatGPT...
 

Attachments

  • CLV_StickyHeader.zip
    9.2 KB · Views: 38
  • HomePosition.jpg
    HomePosition.jpg
    77.7 KB · Views: 87
  • ScrolledToMarch.jpg
    ScrolledToMarch.jpg
    77.5 KB · Views: 75
Last edited:

Less back and forth with your smartphone and PC

As mobile developers, we all have the frustrating experience of taking our eyes off our smartphone and staring at the PC screen, and vice versa. Microsoft "Phone Link" is a useful Windows app that...
 

Debugging your app on real phone without USB cable or B4A bridge

Using a USB Cable for debugging apps is faster and easier than using B4A bridge. But as you know, being always connected to the USB port will decrease the battery life. With this instruction, you...
 

[XUI] CustomListView with floating titles

clv_floatingtitle.gif


Title items are added to the list.
A Panel is set above the list. The panel shows the current title when the top visible item...
 

Attachments

  • CLV_FloatingTitle.zip
    9.4 KB · Views: 1,348
Last edited:

[B4X] RandomUser API - SMM + lazy loading list + DDD

1760519045466.png


Cross platform example of showing a list of users, retrieved from https://randomuser.me/

The API returns a list with the data of 150 random users. The list is parsed and added...
 

Attachments

  • RandomUser.zip
    187.7 KB · Views: 98

User Login Demo - how-to features

Hi y'all,
I've been working on a demonstration app that would show a bunch of how-to's.

Specifically, how to use an "admin" user and a regular user (non-admin) for login data admin (CRUD).
All...
 

Attachments

  • UserAdminDemo.zip
    30.1 KB · Views: 76
  • 1.jpg
    1.jpg
    179 KB · Views: 134
  • 3.jpg
    3.jpg
    264.9 KB · Views: 128
Last edited:

Android 16KB Page Size Compatibility Checker

This script checks for all the necessary markers to be sure your APK/AAB/SO files are 16KB page size compatible.
It has been simplified to easy usage.


What Does This Check?​

Starting with...
 
Last edited:

Share SQLite database between 2 devices

This is just a proof of concept to show that Device A behave like a server hosting a database and Device B connects to it accessing the "shared" database. It is a response to this question...
 

Attachments

  • ShareDB.zip
    17.6 KB · Views: 536
Last edited:

OSMDroid - MapView for B4A tutorial

Attachments

  • 01 - SimpleMap.zip
    5.8 KB · Views: 5,050
Last edited:

Lottie Example with 16kb support

This example is based on the Lotti Library by DonManfred found here. (It still works)

I tried it on 16kb android 15 emulator and...
 

Attachments

  • LottieEx16kb.zip
    13.8 KB · Views: 69
Last edited:

[B4X]How to Implement Lottie in B4XPages (AXrLottie B4A, iLotttie B4i and B4J)

This is B4XPages example for LOTTIE implementation on Android (B4A), iOS (B4I) and Desktop (B4J)

B4A Implementation

Uses AXrLottie. Download the library and dependencies...
 

Attachments

  • LottieB4XExample.zip
    102 KB · Views: 555
Last edited:

[B4X] Class templates

*** This is a trick, a discovery by @aeric, really very useful ***

[B4A-B4J-B4i]


[This is a long post but the process is much simpler than it...
 

Attachments

  • 1758258608074.png
    1758258608074.png
    4.4 KB · Views: 84
Last edited:

[B4X] #CustomBuildAction

The #CustomBuildAction attribute allows running external programs during the compilation process.
The syntax is:
B4X:
#CustomBuildAction <compilation step>, command to run, zero or more arguments...
 
Last edited:

[B4X] Comment Links and #Macros

qHTNrUJnPQ.gif


Comment Links

Code comments can include clickable links. The following schemes are supported:

http(s):// - Link will be...
 
Last edited:

[B4X] B4X Forum Repository

Attachments

  • ForumExtractor.zip
    4.4 KB · Views: 164
Last edited:

Expandable list based on CustomListView

Last edited:

Libraries that do not support 16kb alignment?

Many have gotten the information about their Apps not aligned with the 16KB. Here is how to check which specific libraries are causing the issue

Note: You have to check for each app individually...
 

[B4X] TextEditor - Save and load external files

This is a B4i and B4A example, which demonstrates various external files related tasks.

1626784777442.png
1626784790557.png


The behavior is not exactly the same as the platforms capabilities and behavior...
 

Attachments

  • TextEditor.zip
    184.2 KB · Views: 2,451
Last edited:

[B4X] WebView + CKEditor (rich text editor)

1628407653890.png


This is a cross platform example that adds CKEditor rich text editor using WebView: https://ckeditor.com/ckeditor-5/
Make sure to read CKEditor licensing and pricing...
 
Last edited:
Top