B4XSnippetStrings
Convert English numbers to Arabic or Persian
Convert English numbers to Arabic or Persian
@somed3v3loper · 2019-04-04
B4XSnippetDate/time [B4X]
Daylight Saving Time for Israel [B4X]
Daylight Saving Time for Israel [B4X]
@derez · 2019-03-30
B4XSnippetEncryption [B4X]
RSA Encrypt and Decrypt [B4X]
I build a auth method for my app to protect my API and one of this step is to signed requests to the api to ensure that every request comes from my app. RSA is the best method for that, because this is not a hash, so that the same input is ever the same output. The API knows the Private Key, the apps knows the public key.
@Alexander Stolte · 2019-03-23
B4XSnippetTable/Grid [B4X]
B4XTable - Delete Row [B4X]
B4XTable - Delete Row [B4X]
@Erel · 2019-03-11
B4XSnippetB4X
CallSub with ANY number of parameters
CallSub with ANY number of parameters
@narek adonts · 2019-03-09
B4XSnippetDialogs [B4X][XUI]
easy and fast list choices [B4X] [XUI]
I needed some easy and multiplatform access to option choices. This small lib, based on XUI Views (B4XDialog and B4XListTemplate) seems to work. You have to define a object like ''dlg'' once and than you can ask the user for choices in just one line.
@skrjabin · 2019-03-06
B4XSnippetDialogs [B4X][XUI]
Change the OK-Cancel buttons order in B4XDialog [B4X] [XUI]
OK-Cancel or Cancel-OK, what to prefer in dialogs? It depends on the guidelines and it should be flexible. That''s why I did this small modification in the B4XDialog library and I hope, that something like that could be integrated in the official one.
@skrjabin · 2019-03-04
B4XSnippetFile xfer [B4X]
DownloadAndSave [B4X]
This is a slightly modified sub based on the code from: [B4X] OkHttpUtils2 with Wait For. Call it when you want to download a file and save it. You can wait for it to complete if needed.
@Erel · 2019-02-12
B4XSnippetOther [ATTACHED]
Canadian / USA Postal Zipcodes [attached]
The attached files contain Canadian postal codes and US zip codes - for each region.
@Harris · 2019-01-21
B4XSnippetFirebase [B4X]
Get subscribed Firebase Topics From Firebase [B4X]
The following code will help get the topics a firebase token is subscribed to. It will send a request to Firebase and ask for the reply. The reply is in a JSON file.
@aaronk · 2019-01-11
B4XSnippetFile handling [B4X]
CopyFolder [B4X]
A recursive sub that copies a complete folder.
@Erel · 2019-01-10
B4XSnippetMQTT [B4X]
MQTT SSL and Self Signed Certificates [B4X]
There are two client libraries: jMQTT for B4A and B4J and iMQTT for B4i. Both libraries support SSL connections. You just need to change the URI scheme to ssl:// instead of tcp://
@Erel · 2019-01-01
B4XSnippetList- and scrollview [B4X]
xCustomListView Pull To Refresh [B4X]
You can use this code to add a pull to refresh feature to the standard xCustomListView. The code should be added to the activity.
@Erel · 2018-10-16
B4XSnippetB4X [B4X]
Easy dis-/enabling views (by condition) [B4x]
Easy dis-/enabling views (by condition) [B4x]
@KMatle · 2018-09-21
B4XSnippetDate/time [B4X]
Get time ago from datetime [B4X]
Convert example 2018/2/2 4:4:23 to 3 minute ago or moment ago
@Pooya1 · 2018-09-05
B4XSnippetDrawing [B4X]
Bezier curve [B4X]
How to make the bezier curve with B4X? Here is a simple code, you can edit points by tapping and dragging them and the curve will change.
@Star-Dust · 2018-08-25
B4XSnippetColour [B4X]
Change the background alpha level [B4X]
Change the background alpha level [B4X]
@Erel · 2018-08-17
B4XSnippetImages [B4X][BITMAPCREATOR]
Change Color of Bitmap [B4X] [BitmapCreator]
With this snip, you can easy change a Bitmap/Icon Color.
@Alexander Stolte · 2018-07-27
B4XSnippetFile handling [B4X]
Automatically increment file names [B4X]
if you download a file with Google Chrome for example and you have you''ve already downloaded this one time, then a number will appear next to it. This is now easy possible with this peace of code.
@Alexander Stolte · 2018-07-17
B4XSnippetImages [B4X][BITMAPCREATOR]
Find Minimum Bounding Rectangle [B4X] [BitmapCreator]
Input: A Bitmap or B4XBitmap. Output: A rectangle with the boundaries of the non-transparent area.
@Erel · 2018-07-08
B4XSnippetFile handling
Check equality of two files
A way to compare two files
@fredo · 2018-06-27
B4XSnippetImages [B4X]
Convert bitmap to BMP format [B4X]
Input: B4XBitmap / Bitmap / Image. Output: array of bytes with the BMP format.
@Erel · 2018-06-24
B4XSnippetDrawing [B4X][XUI]
Faster* DrawPolygon Method [B4X] [XUI]
You can draw polygons with B4XCanvas.DrawPath. The following code calls B4XCanvas.DrawPath on B4A and B4i and calls a different method in B4J. DrawPath in B4J is slower than the other drawing methods as it requires clipping the canvas (it is only required in B4J). To summarize, only use this code if you encountered a performance issue with B4XCanvas.DrawPath in B4J.
@Erel · 2018-06-24
B4XSnippetB4R
Calculate Heat Index (B4x compatible)
I wanted to cycle between the actual air temperature and heat index on my little ESP-12E pool project. This can be used in any B4x IDE. It requires a known temperature and humidity. Calculating the heat index requires the temperature to be in Fahrenheit, so if working in Celsius, you need to convert it first: F = (C x 1.8) + 32. To convert Fahrenheit back to Celcius: C = (F - 32) / 1.8
@Kevin · 2018-06-17
B4XSnippetDrawing [B4X][XUI]
Canvas Draw Round Rect, Arcs, Ovals [B4X] [XUI]
XUI v1.60 introduces a new method: DrawPath. With this, now we have more options to draw: Arc, Oval, RoundRect, LineTo
@ivan.tellez · 2018-05-16
B4XSnippetImages [B4X][BITMAPCREATOR]
Blur Image [B4X] [BitmapCreator]
Returns a blurred image
@Erel · 2018-05-14
B4XSnippetDrawing [B4X][BITMAPCREATOR]
Draw radial gradients [B4X] [BitmapCreator]
Draw radial gradients [B4X] [BitmapCreator]
@Erel · 2018-05-10
B4XSnippetImages [B4X][XUI]
Light Effect [B4X] [XUI]
Have you ever thought of making a lighting effect on an image? If you do not, I thought about it ... this is a small code with a simple trick that allows you to get it with B4X
@Star-Dust · 2018-05-01
B4XSnippetImages [B4X][XUI]
Light Effect B4A [B4X] [XUI]
Have you ever thought of making a lighting effect on an image? If you do not, I thought about it ... this is a small code with a simple trick that allows you to get it with B4X
@Star-Dust · 2018-05-01
B4XSnippetStrings [B4X]
Integer to Word [B4X]
Convert an integer number to words (text)
@AHilton · 2018-04-28