Tag Archives: Public Class Example

How to create a Slide from Left animation while deleting a row from a ListView in Android?

By | September 12, 2012

Hello all…… I have written a lost of posts on Listviews. You can see that by just searching Listviews in my site. Today I will show you how to create a slide out animation while we delete a row from a ListView. So this is the xml that contains the ListView. Let it be in the main.xml main.xml… Read More »

How to create a scrolling ListView in android?

By | March 12, 2011

ListView is like a tableView in iPhone or iOS . In this example i will show you how to add a String Array in to the ListView and also make the listView Scrollable. First the xml file . Here the line android:scrollbars=”vertical” will make the scrolling vertically [xml] <?xml version="1.0" encoding="utf-8"?> <relativeLayout android:id="@+id/widget32" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" > <listView… Read More »

ProgressBar in ANDROID…..

By | February 28, 2011

Progress bars are our basic needs when we want to show something for a long time or some progress takes a long time and we want to show it’s progress. Keeping that in mind ANDROID also has built in progress views. There are basically two types of progress views in ANDROID. ProgressDialog.STYLE_SPINNER and ProgressDialog.STYLE_HORIZONTAL Take a look at… Read More »

Custom Toasts in ANDROID.

By | October 5, 2010

First, just show an image inside a toast: [java] package com.Ch.Example.pack; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Toast; public class Example extends Activity { /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); showToast(); } private void showToast() { Toast toast =… Read More »

Play Video using VideoView in ANDROID.

By | September 19, 2010

Playing a video file is simple in android. This post will help you. Put your video in res/raw folder. If no raw folder present then create a new folder inside res. [java] package com.coderzheaven.pack; import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.widget.MediaController; import android.widget.VideoView; public class Example extends Activity { /** Called when the activity is first created.… Read More »