Tag Archives: override

How to stream an audio in Android?

By | August 14, 2012

This is a simple example to how to stream an audio in android. Here is the java code for that. This is the xml that contains the button. When you run this program you will see a button and on clicking on that button you will see a dialog with message “Buffering…..”. Once the buffering… Read More »

How to create CustomProgressBar in android – Part 3?

By | May 23, 2012

Hello all… In my previous posts I have shown two methods to create custom progressbar in android. Check out these tutorials to find out how? 1. How to build a custom progressBar in android- Part 2? 2. Custom progressbar in android with text – part 3 Today in this post I will show you a… Read More »

Custom progressbar in android with text – part 3

By | May 18, 2012

Hello all…… I have posted two posts on how to customize a progressbar in android. 1. Custom Indeterminate progressBar for android? 2. How to build a custom progressBar in android- Part 2? Here is another one with update text on top of the progressbar. Here is how we start. After creating a fresh project create… Read More »

How to download a file from a remote site in android? – Another simple example – Method -3

By | May 7, 2012

Hello all ……. I have shown many examples on how to download and upload files in android through this site. These are other methods for downloadign a file in android. 1. How to Download an image in ANDROID programatically? 2. How to download a file to your android device from a remote server with a… Read More »

Switch Images in ANDROID.

By | April 7, 2012

Hi all …….. Ofter we have trouble with loading continous images in ANDROID from our application directory. The reason is that all resources have a unique resource ID which we need to get to load these resources. The following example shows how to get these unique identifier from the “path” of the resource. For example… Read More »

How to create a custom layout for your camera in Android?

By | December 28, 2011

Hello everyone, Today’s example shows how to create a custom layout for your camera preview, that is if you want a custom layout while your camera is opening. This example helps you to achieve this. First create a fresh project and name it CameraCustomLayout and copy this code to CameraCustomLayout.java file. After that create an… Read More »

Simple View Animation in ANDROID?

By | June 11, 2011

Hi all….. In this post I will show you a simple animation using a textView. It’s really simple. Steps. 1. Create a fresh project and copy this java code into it. 2. Create a folder named “anim” inside the res folder and create a file named “animation.xml” and copy this code into it. 3. copy… Read More »

Preventing Overriding in Java

By | February 25, 2011

Methods and variables can be ‘override’ in subclasses. (Yes, it’s a good feature too!). But what if we don’t want to ‘override’ our Methods and Variables in Java? It’s simple… Declare them using the keyword ‘final’ as modifier. That’s it. eg: So the value of myVariable can never be changed any way. Also for Classes/Methods.… Read More »

How to use picker in iphone, A simple example.

By | December 20, 2010

#import “ViewController.h” @implementation ViewController @synthesize mlabel; – (void)viewDidLoad { [super viewDidLoad]; arrayNo = [[NSMutableArray alloc] init]; [arrayNo addObject:@” Hello “]; [arrayNo addObject:@” Hai “]; [arrayNo addObject:@” Picker “]; [arrayNo addObject:@” Simple “]; [arrayNo addObject:@” example “]; [pickerView selectRow:1 inComponent:0 animated:NO]; mlabel.text= [arrayNo objectAtIndex:[pickerView selectedRowInComponent:0]]; } – (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView; { return 1; } – (void)pickerView:(UIPickerView *)pickerView… Read More »