Rotate a view (degrees)
Rotate a view (degrees)
@KMatle · 2017-02-06
Auto-connect without predefined client or server
A post that Erel made on Facebook about client/server auto-connect reminded me that I had this code & should probably share it because it doesn''t require either device to be "hard" configured as either a client or a server.
@Computersmith64 · 2017-01-30
UDP Broadcast Address
This code uses JavaObject to go over the device network interfaces and find the first UDP broadcast address. This address can be used to send a UDP packet to all devices listening to a specific port.
@Erel · 2017-01-29
JarFileLoader: Embed Files to Libraries
JarFileLoader: Embed Files to Libraries
@Mashiane · 2017-01-19
cGrid
cGrid class and cGridx (code module) to have a scrolling grid
@Robert Valentino · 2017-01-19
AES 128 Key generation
Instead of generating AES keys using just Agraham''s Encryption library, we can improve it, specify the length of the key (128, 192 or 256) and the Bouncy Castle provider using Javaobject and Reflection library
@Javier Alonso · 2017-01-16
NotificationListener get small icon
I have been using notificationListener for a while now and could not find the way on how to get the small icon, so I''m sharing this code that works for me, it gets the small icon but not the background color (don''t know how to get it).
@jtare · 2017-01-03
Fireworks
Fireworks
@BeneBarros · 2017-01-03
NumberFormat3
Number.Format3 operates in a similar manner to NumberFormat2 with additional parameters to provide specified separators, diferent number formats [IE scientific notation] and limit the number of characters for display
@Roger Daley · 2016-12-28
Button Text Autosizer
A helper to size the text on buttons, when they need to be dynamically sized. It supports a very wide range of device layouts.
@Martin Beukes · 2016-12-26
Exploring SQLite Core Functions, Part Three
Exploring SQLite Core Functions, Part Three
@Mahares · 2016-12-19
Exploring SQLite Core Functions, Part Two
This is the second part of a three part series regarding exploring SQLite core functions which are explained in the following link, http://www.sqlite.org/lang_corefunc.html but lack examples. In this snippet I show examples for each of the next 13 functions that are available in SQLite by default . The SQL statement syntax and examples are listed below for these 13 functions: sqlite_version(), sqlite_source_id(), RANDOM(), REPLACE(X,Y, Z), SUBSTR(X,Y,Z), SUBSTR(X,Y), TRIM(X), RTRIM(X), LTRIM(X), RTRIM(X,Y), LTRIM(X,Y), TRIM(X,Y), total_changes()
@Mahares · 2016-12-11
Dotted lines
A sub that draws dotted lines along a panel top or left with the choice of stroke width, as well as dot length and line color. A boolean parameter Vertical indicates if the line is to be along top or left.
@MitchBu · 2016-12-11
Exploring SQLite Core Functions, Part One
Exploring SQLite Core Functions, Part One
@Mahares · 2016-12-07
A good method to handle an uncaught exception
A good method to handle an uncaught exception
@LucaMs · 2016-11-15
Change colors alpha value to a given color
According to Material Design guidelines it is recommended to set the opacity of an color to a special value instead of making the color lighter or darker. Since the color scheme may change at runtime it is eventually neccessary to adapt the alpha value of a textcolor.
@fredo · 2016-11-08
Change RadioButton
An easy way to change the bitmaps of a radiobutton.
@Robert Valentino · 2016-11-05
SETTING
Android > 6 code to automatically open the settings window
@MarcoRome · 2016-10-28
No Action Bar on Appcompat Apps (app launching animation)
Useful when you have to code an app that needs appcompat library (for example, NumberMorphView from Johan Schoeman) but you don''t need the action bar and don''t want to appear on app launching windows
@inakigarm · 2016-10-26
GetBitmapSizeinBytes
Gets the size in bytes of a bitmap in a Bitmap Drawable.Should give an idea to understand better the "in-memory size of the bitmap".
@moster67 · 2016-10-25
ColorStateList as object for view properties
While working with @DonManfred ''s wrap of the VectorCompat library I needed to set a ColorStateList to a VectorDrawable ForegroundTintList property. After fiddling around with xml files in the drawable folder I needed a more flexible way to set the foreground colors and found a snippet from @stevel05 here and modified it a little bit to use it as object.
@fredo · 2016-10-01
Sample Splash Screen
As requested by Fhren Meza after seeing a sample video I posted on YouTube, here is a sample splash screen. In the end I abandoned the transparent background with fade to black because the very top title bar area always looks a little ametuerish. Anyhow, please see the attached project if wanting to re-create the look shown here...
@RandomCoder · 2016-09-29
Basic 3D-Engine
A play around demo of a lightweight 3d-draw program. What it mainly does is display objects made of flat colored faces.
@kopperfeld · 2016-09-21
Get List Of Installed Apps
This function logs a list of installed apps and their icons. I have had for a few years and could be modernized to the new b4a features but it works so. Right now it just logs the output but there is also remarked out code to add everything to a ListView
@JakeBullet70 · 2016-09-20
App Power Switcher (Source code)
Here is my problem. I have 2 tablets and one docking station that I use to control Plex on my TV. So while one is charging the other is on the table or couch or in my hands. So.... I figured While the one is charging why not let it do something? Like show a photo album? That is what this little program does. If the tablet is charging it starts one program and if is not it start another program.
@JakeBullet70 · 2016-09-20
Temperature Indicator
Temperature Indicator
@BeneBarros · 2016-09-13
Get the APK signature at runtime
This code returns the SHA-1 hash of the signing key certificate used to sign the APK. It is the same value that you can see under Tools - Private Sign Key.
@Erel · 2016-08-30
Full Text Search (FTS) as it Applies to SQLite
SQLite supports Full Text Search (FTS3 and FTS4). The purpose of this snippet is to introduce some of its basic syntax and operators. This is a rudimentary introduction to FTS as I just recently started learning about it. FTS is a fast way to look for specific words or sentences in text columns of a SQLite table. You can also search the entire table with one SELECT statement. For newer applications, FTS4 is recommended.
@Mahares · 2016-08-29
Android Bitmap to LibGDX Texture
While highly unlikely, in some experiments you might come to a situation where you want to initialize a LibGDX texture object, with an android bitmap you currently have in memory.
@wonder · 2016-08-28
Intent Skype Conference Chat
With this intent you can create Skype Conference Chat with all user you want
@MarcoRome · 2016-08-23