Tutorials & Examples

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

PreferenceActivity tutorial

This tutorial explains how to use the new PreferenceActivity library. This library allows you to create the "standard" settings screen.

The settings screen is hosted in its own activity. As this...
 

Attachments

  • PreferenceActivity.zip
    6.5 KB · Views: 1,266
Last edited:

StateManager - Helps managing Android applications settings and state

Edit: StateManager was written in 2011. I don't recommend using it for new projects. Use B4XPages + KVS2 instead.

StateManager is a code module which takes care of handling the application...
 

Attachments

  • StateManager.zip
    11.7 KB · Views: 2,081
Last edited:

Material Design 3 - Using a ToolBar as ActionBar

Note: You should use B4A 6.0 or above for this tutorial.

Google recommends to use a ToolBar instead of the standard system ActionBar for Material Design apps. In this tutorial we will use a...
 

Attachments

  • ACToolBarExample2_0.zip
    25.3 KB · Views: 4,112
Last edited:

PacDroid: from scratch to fun

PacDroid: from scratch to fun

In this tutorial, I'm going to explain how to write a game from scratch with libGDX. I will make reference to my tutorials “How to make...
 
Last edited:

[B4X] Sharing modules and classes

In newer versions of B4A, B4J and B4i it is simple to share code modules between projects, including projects targeting other platforms.

More information here...
 
Last edited:

[B4X] Builder Pattern

Last edited:

Corso di B4A in Italiano

Ciao a tutti, ho creato un corso base di B4A in italiano di 30 ore. Per chiunque fosse interessato il corso è disponibile sulla piattaforma Udemy al prezzo scontato di € 15.

Utilizzate il...
 

B4A Book Updated to Version 7.30

B4A-324x400.jpg

I am happy to announce that the B4A tutorial and reference book "Rapid Android App Development using BASIC" by Wyken Seagrave has now...
 

FloatLabeledEditText (ViewsEx)

upload_2016-2-28_15-46-20.png


FloatLabeledEditText is an improved EditText where the hint moves to the top instead of disappearing when there is text in the field.

With the floating hint you no longer need to add...
 

ListView tutorial

Don't use ListView.
Use xCustomListView - it is more powerful, easier to work with and cross platform.
 
Last edited:

[B4X] Backward Compatibility

Backward compatibility = the ability to open projects developed with older version of the IDE in a newer version of the IDE.

Backward compatibility is a critical feature for programming languages...
 
Last edited:

Producing unsigned apk and sign it with eclipse/adt keystore

Ok, this is my first tutorial so please be kind about my errors :D


Here is problem : You have an app made without B4A. You wantto remake it but you need to sign it with your old...
 

[B4X] AsyncStreams Tutorial

New video tutorial:


AsyncStreams allows you to read data from an InputStream and write data to an OutputStream without blocking your program. The reading and writing are done...
 
Last edited:

Text files

Many applications require access to a persistent storage. The two most common storage types are files and databases.
We will cover text files in this tutorial.

The predefined Files object has...
 

Android Wifi-Direct Tutorial

Android 4+ devices support Wifi Direct (Wifi P2p). Wifi Direct allows you to connect two devices over wireless without an access point. It is similar to Bluetooth with a much extended range and...
 

Attachments

  • WifiDirectExample.zip
    8.7 KB · Views: 17,258

Shaders in libGDX

In this tutorial, I'm going to modify the Perf_Flakes demo of the libGDX library to explain how to use shaders with your objects rendered by lgSpriteBatch. I'm NOT going to explain the basics of...
 

Attachments

  • Perf_Flakes_shader.zip
    95.9 KB · Views: 1,184

IPInfo - B4A Library source code

Sometimes, we need certain things to be done but there are not APIs available, so what we do? we create our own.

I always emphasize that we need to use our imagination and be resourceful, the...
 

Attachments

  • IPInfo_Lib_Source_Code.zip
    13.8 KB · Views: 703
Last edited:

CustomBottomSheet - B4A Library source code

Since I've seen a lot of downloads on my previous tutorial HERE I've decided to write another nice looking (and hopefully useful) custom view written in 100% B4A, and I also hope you guys...
 

Attachments

  • CustomBottomSheet_SourceCode.zip
    13.9 KB · Views: 1,312

GPU overdraw

Every time your app draws a pixel on the screen, it takes time. Every time your app draws an opaque pixel to replace something that has already been drawn, it wastes time. Drawing a pixel more...
 

ScrollView example with multiselection and SQL

Here is another ScrollView example with:
- adding a row
- moving a selected row up and down
- mono-selection, clicking on one row selects it, clicking on another row unselects the previous one and...
 

Attachments

  • ScrollViewMultiselect.zip
    9.5 KB · Views: 4,344
  • ScrollViewMultiselect1.jpg
    ScrollViewMultiselect1.jpg
    48.4 KB · Views: 20,965
  • ScrollViewMultiselect2.jpg
    ScrollViewMultiselect2.jpg
    47.9 KB · Views: 20,409
Top