Tutorials & Examples

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

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:

Simple previous-next example

Simple previous-next example

B4X:
#Region  Project Attributes
    #ApplicationLabel: Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape...
 

Attachments

  • Example.zip
    299.9 KB · Views: 473

[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:

Colors Game (Simple game source)

Hi all.
i made this game some time ago, its simple, i never used, i found today on my old sources folder and i m here to share with all.

The labels are in portuguese, but is very easy to...
 

Attachments

  • colorsgame.zip
    365.5 KB · Views: 784

7 Segment LED Digital Clock

Attached project simulates a 7 segment LED digital clock. No libs other than the B4A core lib are required.
You can also try this analog clock here

DigitalClock.png
 

Attachments

  • DigitalClock.zip
    58.2 KB · Views: 1,736
Last edited:

Glitching screen - B4A Library source code

I was browsing the forums and came across THIS post, and that gave me an idea for a little funny class/library.

The code attached demonstrates how to use B4A to create libraries using code...
 

Attachments

  • Glitch_Source_Code.zip
    152 KB · Views: 524
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:

Take a Screenshot with Inline Java Code

I have tested this on an Android 7.0 device only - take a screenshot of your activity. You need to enable the JavaObject library to make use of it.

@JordiCP solved my initial problem here...
 

Attachments

  • b4aTakeScreenshot.zip
    16.3 KB · Views: 1,027

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:

Compass: TRUE HEADING & Magnetic Declination.

I am presenting a test project - Compass. Post #1
- displays TRUE HEADING with local magnetic declination.

Tested in parallel with the application AndroiTS GPS Test v.1.48 Free...
 

Attachments

  • Screenshot_2017-11-TrueHeading.png
    Screenshot_2017-11-TrueHeading.png
    60.4 KB · Views: 851
  • TRUE HEADING.zip
    276.2 KB · Views: 794
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...
 

Downloading and Printing 1 Bit BMP to ESC/POS Printer

Using the feature of resident images of Datecs dpp250. This is the way I found with Erel help to convert a 1 Bit BMP to ESC format, download to the printer, clean printer memory, write printer...
 

Attachments

  • ESCPOSGraphic.zip
    337.2 KB · Views: 1,530

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: 16,996

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,062
Top