Tag Archives: setTextSize

Introduction to Android Canvas – Simple Example

By | December 17, 2016

The Canvas can be used to draw graphics in android. It provides methods to draw oval, rectangle, picture, text, line etc. The Paint class is used with canvas to draw objects. It holds the information of color and style. In this example, we will draw some 2D Shapes. We will create class that extends View… Read More »

How to align a text in Android Programatically?

By | August 6, 2011

This is a simple demo on aligning a text in Android. You can check out for more details at the developers site. This code explains how to write a String or text on a canvas and how to give it a custom font or inbuilt font programatically, change the color of the text or canvas… Read More »

TextSwitching animation in ANDROID or Using TextSwitcher Control in ANDROID

By | July 2, 2011

Hi all….. Today I will show you how to do a simple and beautiful text animation while switching the text in a textView in android The advantage is that you don’t need a seperate xml file for animation in this program, all is done inside the java code. This is the main java file. Here… Read More »