Tutorials & Examples

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

Audios for WhatsApp (CLV with 2 columns)

Hi all.
I've been looking at my old sources and found this example, and now I'm going to share it with you.

this example size is 14mb+ because have 200+ audios example.
The example use CLV with 2...
 
Last edited:

Analog24hClock - Post #12

It wraps a tiny bit of this - just enough to show the clock. Thought it looked quite nifty...Have done nothing special to it other than painting the hands and the face a bit...:) Lib...
 

Attachments

  • Analog24hClock.zip
    494.3 KB · Views: 859
  • src.zip
    262.6 KB · Views: 781
Last edited:

B4A and PHP REST

Thanks @Erel for free version that I plan to buy but donate instead.

I'll share my B4A knowledge in Thailand, your great product must popular, later.

PHP is well known for web developer...
 
Last edited:

Image - Enhancing Image Contrast by means of Histogram Equalization and Histogram Stretching

HISTOGRAM.png


This project demonstrates contrast enhancement of low contrast Grayscale images based on Histogram Equalization as explained at...
 

Attachments

  • JHS_HIST_EQUAL_V2.zip
    482.8 KB · Views: 990
  • JHS_HIST_STRETCH.zip
    482.6 KB · Views: 860
Last edited:

Square Progress Bar

It wraps part of this Github project. Library files are in the /files folder of the B4A project. Copy them to your additional library folder. Posting the zipped B4A project as well as the...
 

Attachments

  • SquareProgressBar.zip
    314 KB · Views: 867
  • src.zip
    10 KB · Views: 633
Last edited:

Dynamic creating of views "retrieved" from a database (php + MySql)

If you are lazy creating views "by hand" or you simply want a "form" depending on a MySql table take a look at this small app.

Type in the Database and Table Name and the IP-Address of the server...
 

Attachments

  • GetCol.zip
    479 bytes · Views: 1,308
  • MySqlViews.zip
    7 KB · Views: 1,445

Have Back and Front Camera's & has Flash (inline Java code)

This is just some simple inline Java code to check if a device has a Back facing camera, a Front facing camera, and a Flash (it requires the JavaObject library to be enabled).

1.png
...
 

Attachments

  • b4aHasFrontBackCameraAndFlash.zip
    8.8 KB · Views: 685

GIF Movie Player

The attached project is an example using the XtraViews library.

If one of the classes in that library is called "MovieView" then let's play some animated GIF movies. :D


Have fun...
 

Attachments

  • GifMoviePlayer_Sample.zip
    59 KB · Views: 1,552
Last edited:

Raindrop/Snow effect

Hi all,
Just a small sharing.
Using a timer to make a raindrop or snow effect.I don't know whether it's the correct way to do this. =D
B4X:
Sub Timer_rain_Tick
    Dim image As ImageView...
 

Attachments

  • Screenshot_2017-12-12-09-14-57-481_b4a.rain.png
    Screenshot_2017-12-12-09-14-57-481_b4a.rain.png
    38.9 KB · Views: 1,307
  • Screenshot_2017-12-12-09-20-51-513_b4a.rain.png
    Screenshot_2017-12-12-09-20-51-513_b4a.rain.png
    59.2 KB · Views: 980
  • rain.zip
    9.1 KB · Views: 566

Two functions on arrays

Pending confirmation by Erel, I post three functions about arrays and maps that may be useful.

The first is to verify that an object variable is an array:
B4X:
Public Sub IsArray(Var As Object) As...
 
Last edited:

Scrollview: Adding labels and setting their height automatically depending on the text(size)

This is just a simple example (and yes, there are others doing similar). You can modify this example it by using other colors, gradients, adding other views and so on to have a simple but good...
 

Clock - 24hr analogue clock

pic1.png


This was done just for fun. It is a 24 hour analogue clock/watch. Have used the GPS Example from @klaus as base for this clock.
JHS CLOCK V1 => a 24 hour clock running clockwise...
 

Attachments

  • JHS CLOCK V1.zip
    173.4 KB · Views: 896
  • JHS Clock Panels.zip
    19.6 KB · Views: 663
  • JHS CLOCK TIME TRAVEL.zip
    174.6 KB · Views: 690
Last edited:

Slide Switch - On / Off

Switch.png


This is a very, very simple project implementing a slide switch with B4A code only. Track flag1 and flag2 to know the state of the two switches (i.e are the switches on or off)...
 

Attachments

  • JHSswitch.zip
    12.4 KB · Views: 987
Last edited:

Otsu Thresholding - binarization of images

This project demonstrates grayscaling of a multi colored image and then the binarization (i.e black or white pixels only) of the grayscaled image. The binarization is based on Otsu Thresholding as...
 

Attachments

  • JHS_OTSU_V2.zip
    61.2 KB · Views: 878
Last edited:

LibGDX Sensor Access

I'm currently messing about with libGDX and will be using the Accelerometer for input. I borrowed some code from the web and B4A'd it. It includes device rotation, orientation, resolution, X, Y, Z...
 

Attachments

  • sensors.zip
    5.2 KB · Views: 582
  • Screenshot_2014-05-08-20-00-15.png
    Screenshot_2014-05-08-20-00-15.png
    168.1 KB · Views: 469
  • axis_device.png
    axis_device.png
    17.2 KB · Views: 477
Last edited:

World Time - 7 segment digital clocks x 6

WorldClock.png


The attached project creates 6 x digital clocks (simulating 7 segment display). It will display the default time of your device on all 6 the clocks when the app is launched. Click on...
 

Attachments

  • DigitalClockWorld.zip
    64.1 KB · Views: 1,151
Last edited:

ScrollCoins - Using GameView to implement a scrolling grid

 

Attachments

  • ScrollingCoins.zip
    7.5 KB · Views: 1,217

ASCII ART

Have done this purely for the fun of it. The project uses 70 ASCII characters to generate an ASCII ART image from the bitmap. The ASCII ART image is actually a label with the label's text set...
 

Attachments

  • b4aAsciiArt.zip
    21.2 KB · Views: 530
Last edited:

RoundBitmapWithBorder - inline java code

Attached project draws a circular bitmap within an imageview including an adjustable border (colour and width) around the image. Making use of inline java code. Only JavaObject V2.01 required...
 

Attachments

  • RoundBitmapWithBorder.zip
    85.6 KB · Views: 772
Last edited:

Image - Dithering 8 bit Grayscale images

This project demonstrates dithering of 8 bit grayscale images as explained at www.fiji.sc/Dithering. Methods included are the following:

Floyd-Steinberg
Atkinson
Jarvis-Judice-Ninke
Stucki...
 

Attachments

  • JHS_DITHERING_V4.zip
    41.5 KB · Views: 680
Last edited:
Top