If we need to scroll two ScrollLayout at the same time we can create a new View th...
We can drop shadows to our controls (TextView, Buttons, Checkbox, …). Adding this ...
We can create nice buttons simply using few colors and gradients. We need to creat...
On middle/big projects we usually add lots of resources that we can use on code fi...
When we are creating a multi-language application for Android, we need to create s...
If we have a service in background and we need to launch an Activity in foreground...
two operations are expensive when we create custom lists: Inflate (covered on the ...
We can optimize the Adapters attached to a ListView inflating our custom layouts w...
We can play the user’s alarm sound in our application using the class RingtoneMana...
We need to download the JSCH libraries and JZLIB libraries that we can get directl...
We can send broadcast messages - Intents - in our application. They can be useful ...
A very common error when we are working with database is not check that we have th...
Sometimes we need to resize the layout when the keyboard appears. For example, whe...
In order to intercept the BACK button and other buttons (without include HOME butt...
In order to use custom fonts in some Views, we need to import the font files to th...
This code convert a Bitmap to Drawable and vice versa. It is useful when we are wo...
If we need to create an application that supports different languages, we need to ...
We can create easily backgrounds with XML drawables. In this example, we will crea...
Save and load preferences on Android is quite easy. You can save primitive values ...
With the class Handler, you can throw a Runnable class (a intended to be executed ...
Android has some tools to receive touch events, but with this code, we will receiv...
We can get the background that is currently used by the device and convert it to a...
This code gets the version that you used in your ManifestFile.xml and save it in a...
Set your android application on fullscreen view, removing the default Android task...
Create a listener when an EditText changes the text inside. I have added a button ...
This is an easy example about how to pass information from one Activity to another...
This code shows a yes/no dialog as pop-up. The code can handle the response. // Y...
This code inserted in the a layout can be used to show an horizontal line. <!-...
You can reuse a View from a XML file in your code loading it like a View. It is us...
This code intercepts an URL opened from the default Internet browser in Android an...
Innovator, Entrepreneur, Blogger, Engineer, Craftsman, Cartoonist, Geek, Improv and 3D Printer enthusiast