Tag Archives: Tv Tv

Saving TextFile to SDCARD in android?

By | January 29, 2012

Hello android lovers, In today’s tutorial I will show you how to 1. Create a text file and save a textfile in your SDCARD in your preferred path. 2. Read the contents from the same file and show it in a TextView. For writing a file we use the FileWriter class and for reading the textfile we use… Read More »

Simple CountDown Timer in android.

By | August 24, 2011

Here is a simple example on using a countdown timer in android. [java] package pack.coderzheaven; import android.app.Activity; import android.os.Bundle; import android.os.CountDownTimer; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class TimerDemo extends Activity { Button start, stop; TextView tv; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); start = (Button)findViewById(R.id.start); stop = (Button)findViewById(R.id.stop); tv = (TextView)findViewById(R.id.tv); tv.setText("10");… Read More »

TextView with link in ANDROID…….

By | May 10, 2011

Hi all……. All of you may be familiar with TextViews in ANDROID. But how many of you know that we have have html as text in a textView. This post is a simple example to show this. Create a fresh project and copy this code to the main java file. [java] package com.coderzheaven; import android.app.Activity; import android.os.Bundle; import… Read More »

How to check SDCard free space in ANDROID?

By | April 19, 2011

This is a simple example that shows how many bytes are free in your SDCard. Inorder to run this example, you have to create an SDCard and start the emulator with the SDCard. Now create a fresh project and name it “FreeSpaceActivity.java” and copy the following code to it. [java] package pack.coderzheaven.check_space; import android.app.Activity; import android.graphics.Color; import android.os.Bundle;… Read More »