Tag Archives: STROKE

How to create transparency without using image in Android?

By | February 4, 2013

Transparency in a background of a View in android can be achieved in two ways. 1. By providing a transparent image. 2. By providing an XML that has as shape with end, starting and middle color. This is a sample XML that creates a transparency. bg_gradiant.xml Note : By Simply providing a color doesn’t creates… Read More »

How to draw Arcs in Android using canvas?

By | January 10, 2013

This is a simple example showing how to draw Arcs in android, You can use this to create piecharts or someother similar thing you want. Here we have 3 classes. 1. GraphicsActivity.java 2. MainActivity.java 3. PictureLayout.java GraphicsActivity.java PictureLayout.java MainActivity.java Download the complete source code from here.

How to create a widget in android?

By | June 7, 2012

Hello everyone… Today I will show you how to create a simple widget in android? First create a new project and name it “Widget1” and name the activity “WidgetDemo1“. Actually we dont need the activity class here. You can delete it and delete the corresponding entry of it from the AndroidManifest file also. Now we… Read More »

How to show a sliding window from below in Android?

By | December 22, 2011

Hello everyone, I have already showed you how to use a SlidingViewer to create a slidingWindow. Today I will show another way to create such a window with the help of animation. Please check one of my previous posts to do this in another way. How to show a sliding window from below in Android?… Read More »

Applying a shape to xml in android

By | April 15, 2011

By adding a custom shape we can make the layout more attractive. For this we have to create a xml file and specify this in the main layout xml file First make a xml inside the drawable folder. Then in the main file specify this shape like this. The “category” is the name of the… Read More »