source

Android Dialog Input Text

Here we are going to see about how to get input text from user in dialog using edittext.Moving ahead from custom dialog example and other dialog example, here we are going to see about how to get input text from user in dialog using edittext. In some cases we may need to get input from user in dialog. At that time we need no to use custom dialog instead of that you can use simple alert dialog itself by using setView(View view) property. Using setView() we can set any view to alert. Here we set the edittext view to setView() to get input from user.

    

Android TabHost Tutorial – Part 2

Here we are going to see about how to set TabWidget Tab background/color, tab icon with a simple example.

Android TabHost Tutorial - Part 1

In this tutorial, we are going to see about simple tabhost example that contains two tabs & TabSpec uses for tabs.

Android Viewflipper Example

Here is a small and easy example of how to use viewflipper in android. Android viewflipper is used to add multiple views in a single Flipper.

ViewFlipperName.showNext() is used to show the next item in flipper.

Android Check GPS is Enabled or Not

In android, we can easily check whether GPS is enabled in device or not using LocationManager.
Here is a simple program to Check.
GPS Enabled or Not :-
Add the below user permission line in AndroidManifest.xml to Access Location
[sourcecode language="xml"]
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
[/sourcecode]
Your java class file sgould be
[sourcecode language="java"]
public class ExampleApp extends Activity {
/** Called when the activity is first created.

Android VideoView Example

In android we can play the video using videoview.

Android TTS (Text To Speech) Example

In android,we can able to make text as speech using TTS. TTS supports English, French, German, Italian and Spanish Languages.
TTS Example :-
[sourcecode language="java"]
public class TTSExample extends Activity implements OnInitListener {
/** Called when the activity is first created.

Android MediaPlayer Example

In android, we can play the audio file from the resource.
How to do it ?
Step1:- In your project , create a folder named with 'raw' in res folder (res --- > raw).

Android Gallery Example

In android, we can show multiple image in gallery view. Here is a android gallery example that will explain how to show the images in gallery view.
Example for Android Gallery :-
Create a attrs.xml file in res/values folder.

Android Checkbox Default Checked

In the previous post about checkbox, we already saw about the Android Checkbox Example
Now we are going to see about how to set default check value to the checkbox. In android, when we are showing the checkbox we may need to check default one of the checkbox.

Syndicate content