Factorial Function
I had to get the factorial of a number but could not find a buildin function in b4x so i created a function for that.
@ilan · 2019-04-16
Random Text Generator
Code to generate placeholder texts as an alternative to LoremIpsum. Multiple paragraphs of different and arbitrary length are easy to create.
@fredo · 2019-04-15
Draw Bitmap Rotated From Upper-left Corner
Draw a bitmap rotated from the upper-left corner, not the center of the image as the canvas DrawBitmapRotated function does
@Jeffrey Cameron · 2019-04-11
Application Log File Function
A logger function, it''s very handy when you have multiple app and your trying to see who doing what.
@Jmu5667 · 2019-04-09
Using Material/FontAwesome Icons as Bitmaps
This sub will let you use icon fonts as bitmaps
@Kwame Twum · 2019-03-22
Check if string is GUID
This code is to check if a string is a valid GUID.
@asales · 2019-03-07
xCustomListView Loading Tip
When loading a large CLV list (items derived from a ResultSet - for example), I find it loads much faster if you set the underlying scroll view visibility to False (before loading the list). Set it back to True after populating the the custom list.
@Harris · 2019-02-24
Spannable Text to HTML
Recently I faced a problem involving spannable text where I needed to store an EditText content and later restore in a new View on screen. It is a hard job as you can''t store a formatted spannable text in a database or in a flat text. The solution is to convert the EditText content to html , store, and then convert again from html and show. There are two Android java function those we can use to do this: ToHtml FromHtml With a small implementation and the help of @Erel I developed a small java routine that could be useful to store and recover spannable texts, maintaining the types formatting. Attached also an apk with a sample code using the routine. To test: - Open a formatted text in any app (browser, e-mail, etc) - Copy the text - Paste in the bottom edittext - Click the button - The formatted text will be copied to the edittext on the top
@Marcos Alves · 2019-02-17
Google Play Game Services Installed?
In order to avoid the popup that says, "app won''t run without Play Games service," I discovered a method for checking to see if it is installed. If not, you can skip your code relating to Play Games services.
@Jack Cole · 2019-01-22
CameraEx : get smallest possible size
CameraEx : get smallest possible size
@HAH · 2019-01-19
DBUtils 2 - New Method - HasRecords
DBUtils 2 - New Method - HasRecords
@Harris · 2019-01-18
Convertir Numeros a Letras
Convert Numbers to Letters
@hacosta · 2019-01-14
Dual SIM call
Dual SIM call
@peacemaker · 2019-01-13
Ellipsize Alternative
Ellipsize doesn''t work on ListView Labels... So - I could switch to a CustomListView, but I''m lazy.... Instead, I thought I''d share the code I''ve been using for a long time to truncate text in ListViews.
@Computersmith64 · 2019-01-02
Copy from Dir.Internal to SD Card using ExternalStorage
I was looking for help on copying data from Dir.Internal to an SD Card using the ExternalStorage class and noticed a few other people couldn''t quite get to grips with it either. So for them here''s an example, which works for me. Took me a while to get something to work, but got there eventually. Works for me anyway.
@colboy · 2018-12-27
GTA style location overlay
An Android app to create a GTA-style text overlay when the user moves to a new location, displaying that location in the top corner of the users device for 5 seconds before fading out.
@andyr00d · 2018-12-24
Display Spotify Song Info
I wrote an app for myself to use when running. I always listen to Spotify and I would hear a song that I didn''t know. Rather than playing around with the phone to see what it was, I added some code to display it.
@ac9ts · 2018-12-21
SD: Switch with CustomView
I created SwicthView. I have noticed that you have created a similar object already on the ViewEx library.
@Star-Dust · 2018-12-13
Convert timestamp date to Brasil format
Simple code to convert a timestamp to Brasil format, easy to modify to another countrys format
@Douglas Farias · 2018-12-04
Check if a string is Base64 [isBase64]
Code to check if a string is base64 hash.
@Douglas Farias · 2018-12-02
Check if a string is CPF or CNPJ [is_CpfouCnpj]
Check CPF or CNPJ (Brasil - people or companies)
@Douglas Farias · 2018-12-02
Check if a string is valid Json [isJson]
Check if a string is valid Json [isJson]
@Douglas Farias · 2018-12-02
midiDeltaFromLong [delay midicode from time]
midiDeltaFromLong [delay midicode from time]
@Hans- Joachim Krahe · 2018-11-25
Share text messages in all social [and not] apps
Here is a code I developed with cooking and mixing of given recipies... Share text (you can include URIs) in every social app and more... Use it in activities.
@hatzisn · 2018-11-25
Unique combinations of m objects from a set of n
A fast combination algorithm
@William Lancee · 2018-11-18
Get device''s Google Account
I recently needed to check for device''s google account and I was not able to get it done with Erel''s code. I was not getting any results. So a little search on the Internet and a little mixing of the soup and voila
@hatzisn · 2018-11-17
Automatically set the text size
This is based on a nice new feature in Android Support library. It automatically adjusts the view''s text size to make it fit. You can call it with any of the following views: Label, Button, CheckBox, RadioButton, ToggleButton. Note that the size will change whenever you set the text.
@Erel · 2018-11-14
Check Internet Connection 2
I made some modification to be work fine even if you are connected to network but no internet
@HAH · 2018-11-10
DBUtils: clear table [delete all]
DBUtils: clear table [delete all]
@peacemaker · 2018-11-07
Ordinal Formating
I recently need to format numbers as 1st, 2nd, ... 121st, ⦠So I wrote these routines.
@Robert Valentino · 2018-11-05