Tutorials & Examples

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

Setting custom font for whole application without any library

Hi everyone,

After a week I have finally figured it out how to add a custom font for the whole application without any library or extra code.

Here is the solution:
  1. Create a folder...
 
Last edited:

Create PDF with b4a and php

Hallo,

from time to time someone is asking on how to create a pdf with b4a.
I dont know how to do that ONLY with b4a.

Today i spend a few hours to write a b4a-example and a php-script which...
 

Attachments

  • b4aexample_createpdf_1.1.zip
    12.7 KB · Views: 1,644
  • 20140530_082501_356253050101034.pdf
    25.3 KB · Views: 1,645
Last edited:

AdMob Mediation (with InMobi)

AdMob supports ads mediation. This means that the ad can come from different ad networks and not just from Google AdMob network.

It can improve the fill rate and the revenue earned.

upload_2016-9-26_16-13-44.png
...
 

[Tool] Enhance your layouts with the "Layout bounds" developer option

The creation of layouts is very easy with the B4A Designer.

With more complex forms, however, it can happen that the result looks a bit weird. Usually the heights or distances between the...
 

Android Daydream / DreamService tutorial

Android 4.2 includes a new powerful screen saver feature named Daydream.

A "dream" starts when the device is docked or charged and the screen timeouts. By default dreams are non-interactive...
 

Attachments

  • Daydream_Circles.zip
    6.7 KB · Views: 1,179
  • Daydream_Webview.zip
    6.9 KB · Views: 1,167
  • Daydream_library1.0.zip
    4.8 KB · Views: 1,169

[B4X] B4XTable - Editable table and export to CSV

SS-2019-02-18_16.52.26.png


This example shows how to modify the table data. When the user clicks on a cell we show an input dialog and let the user...
 

Attachments

  • B4XTable-Editable.zip
    52.1 KB · Views: 2,600
Last edited:

[B4X] Tip - Modified server response

While analyzing a Crashlytics crash report of a small app of mine I was surprised to see the following error:

Fatal Exception: java.lang.NumberFormatException
For input string...
 

B4XTable - Photos Album

SS-2019-03-03_13.10.22.jpg


In this example the table is used to show the camera roll photos.

Main steps:
1. Get permission to access the external...
 

Attachments

  • B4XTable-Album.zip
    10.7 KB · Views: 1,112
Last edited:

Using RSA in B4A to communicate with PHP/OpenSSL

As you might know, I do a lot of apps which communicate with my Apache servers via httputils and php. For a longer time I was missing some strong encryption. I knew that there was agrahams...
 

Attachments

  • RSAExample.zip
    9.4 KB · Views: 1,091
Last edited:

[B4X] [XUI] CustomListView - lazy loading / virtualization

xCustomListView v1.50 adds an important new event named VisibleRangeChanged. This event is fired whenever the visible range of items changes.

We can use this event to defer the items creation...
 
Last edited:

New B4A book: Android App Development for Electronics Designers

Similar to FloatLabeledEditText

Someone asked me to do something like FloatLabeledEditText.

I made this example. It is not identical, but it is a track or a point of partenzs for those who want to create a similar one
 

Attachments

  • LabelExtended.zip
    9.4 KB · Views: 937

Creating custom Text Selection actions with ACTION_PROCESS_TEXT

Android 6.0 Marshmallow introduced a new floating text selection toolbar, which brings the standard text selection actions, like cut, copy, and pastes, closer to the text you’ve selected...
 

Attachments

  • ACTION_PROCESS_TEXT.zip
    9.1 KB · Views: 769

Cards list with CustomListView

Screenshot_20171228-125445.png


This example uses xCustomListView to implement a list of cards.

As the items layout is created with the designer, it is simple to implement any layout you like. You can also combine...
 

Attachments

  • CardsList.zip
    114.4 KB · Views: 4,528
Last edited:

[TUTORIAL] Inter-app Communication with Intents

DISCLAIMER:
This tutorial is written without testing code. There may be bugs, but try to understand the process, not copy the code.


An intent is a way for different applications...
 

Adaptive Icons

Last edited:

B4A Book English Edition Updated to Version 8.80

B4A-324x400.jpg

I am happy to announce that the English version of the B4A tutorial and reference book "Rapid Android App Development using BASIC" by Wyken...
 

[B4X] B4XTable - Multiple rows selection

Edit: Don't use this code. Use B4XTableSelections class instead:
This...
 
Last edited:

Prevent accidental clicks

I had issues when i did an animation like clicking on a button and shrink it that if you click twice on it it will perform 2 times or more the animation you want to do or if you start a task that...
 

Immersive Mode with Notch area support

Attachments

  • ImmersiveMode_With_Notch_Area_Support.zip
    9.5 KB · Views: 1,007
Last edited:
Top