B4ASnippetImages
FontAwesome To Bitmap
Unlike an older "TextToBitmap" sub that you can find in the forum, this code vertically centers the icon. It can also be used in B4J and B4i (only need to change the font line).
@Erel · 2020-06-02
B4ASnippethttp
Disable automatic redirections with OkHttpUtils2
Disable automatic redirections with OkHttpUtils2
@Erel · 2020-06-01
B4ASnippetFile handling [PATH]
get all image folders [path]
Get all image folders [path]. This code runs on my phone in release with 156ms. And i have over 1k folders and over 10k images.
@Alexander Stolte · 2020-06-01
B4ASnippetToast
My ToastMessageShow
My ToastMessageShow
@T201016 · 2020-05-27
B4ASnippetWifi
Access Wifi Information
This code takes care of requesting the location permission which is needed on Android 8+
@Erel · 2020-05-18
B4ASnippetPDF
Print PDF library supports higher resolution
Print PDF library supports higher resolution
@MitchBu · 2020-05-18
B4ASnippetFile handling
External Storage - Simple Example
Enclosed is a simple call to storage , creating a directory and copying files from DirInternal using ExternalStorage Class
@rodmcm · 2020-05-13
B4ASnippetDrawing
Drawing Multiline Text
This code creates a label with the text and returns a snapshot of the label
@Erel · 2020-05-12
B4ASnippetBarcode/scan
HTML-Standalone QR-code generator for websites
Sometimes you need a QR-code generator in your website (which is working together with B4x). I searched for a standalone creator which is easy to handle. I came to this site: QR-code generator. I uses Javascript to generate the QR-code. I''ve modified the example (removed all inputfields and replaced them with simple variables).
@KMatle · 2020-05-04
B4ASnippetGPS/location/maps
WGS 84 reader
Code that reads Wgs84 coordinates DDmmss.ssss / DDmm.mmm / and DD.ddddd and converts to floating point coordinates
@booch34 · 2020-04-29
B4ASnippetFile xfer [INCLUDED]
Upload a file to your server with HttpJob and php[included]
Upload a file to your server with HttpJob and php[included]
@scottie · 2020-04-26
B4ASnippetFile handling
Delete oldest files, if no free space
Delete oldest files, if no free space
@peacemaker · 2020-04-25
B4ASnippetB4A
Swipe left-right between activities
To swipe left-right from one activity to another without panels, buttons or tabs.
@WN van Surksum · 2020-04-08
B4ASnippetNotifications
Change notification background color
Change notification background color
@Mrphone · 2020-04-01
B4ASnippetDatabase
SQLite - check table exists
SQLite - check table exists
@Alexander Stolte · 2020-03-22
B4ASnippetNotifications
Allow user to select custom notification sound and have complete control over playing it
Allow user to select custom notification sound and have complete control over playing it
@JohnC · 2020-03-11
B4ASnippetSlider
RoundSlider Min/Max Values
I''ve just changed the XUI Views Library to have Min/Max Properties editable at runtime
@advansis · 2020-03-11
B4ASnippetTable/Grid
B4XTable Tricks
1) Find navigation panel and switch positions with search filed 2) Add click event to page number, the pageButton event will open a dialog to specify a target page (you need to add a B4XDialog and set B4XTable1.CurrentPage = InputTemplate.Text) 3) Light theme for search field
@William Lancee · 2020-02-19
B4ASnippetImages
Resize Bitmap with a maximum Byte limit
Sometimes the images we use in our Apps are overly large. In some cases, images are entered by the user and therefore we do not know the size. And to manage them we need them to fall within a certain Byte limit. How to reduce them within the limit? Here is a code that allows you to redimension the images while maintaining the proportion and returning within the Byte mitie that serves us
@Star-Dust · 2020-02-01
B4ASnippetImages
LoadBitmapResize conundrum
LoadBitmapResize conundrum
@drgottjr · 2020-01-17
B4ASnippetAnimation [AGAIN]
Animation with SetLayoutAnimated [Again]
This is another example of using SetLayoutAnimated method that we can use to create animation.
@rraswisak · 2020-01-09
B4ASnippetAudio/Video
VideoRecordApp with FileProvider
VideoRecordApp with FileProvider
@Erel · 2020-01-07
B4ASnippetAudio/Video
FFT Test with source
A test program to detect sound. It acquires audio data from the microphone, performs an FFT and magnitude squared, then graphs the "bin" output.
@canalrun · 2020-01-06
B4ASnippetDate/time
TakeTime
A way to calculate the time taken by a part of source code (very simple and rarely useful but... I was tired of writing these lines every time).
@LucaMs · 2019-12-13
B4ASnippetDatabase
Clean SQLite database, if it grows much
Long working apps have DB that grows and grows. It must be controlled, when records qty is very big, and most old data should be deleted
@peacemaker · 2019-12-01
B4ASnippetAction Bar, Drawer, etc
Bottom Popup Drawer
Bottom Popup Drawer
@maddy · 2019-11-26
B4ASnippetAudio/Video
Choose audio file and play with MediaPlayer
Although the use case (see title) sounds trivial, it took some time to get the result. The search returned many hits on the topic, from which the last valid "Single Point of Truth" could be found. The obstacles were the read permission and the path provided by the ContentChooser. Thanks to Erel''s "GetPathFromContentResult()" the path format expected by the MediaPlayer could be determined.
@fredo · 2019-11-10
B4ASnippetWebView
WebViewExtra: Call B4A Sub from WebView
WebViewExtra: Call B4A Sub from WebView
@rraswisak · 2019-11-06
B4ASnippetOther
Get relative view position
These two subs will get the positions of a view relative to the activity, regardless of how many parent panels it is nested in.
@stevel05 · 2019-11-05
B4ASnippetGame
Sudoku Solver Collaborative Project
I created this as a ''lazy'' Sudoku solver and it developed a bit by adding in brute force auto-solving.
@rodmcm · 2019-10-24