Android Custom Toast Tutorial - Going to see how to display a textview in toast using setView() & some more properties of Toast - Custom Toast Notification.

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 DatePicker Dialog Example

Now we can display android datepicker dialog box in all android mobile phones.

Example for Android Datepicker Dialog :

[sourcecode language="java"]
public class ExampleApp extends Activity implements Button.OnClickListener {
private Button b1;
static final int DATE_DIALOG_ID = 0;
public void onCreate(Bundle savedInstanceState) {
// Adding button to the layout
// Creating dialog
protected Dialog onCreat

Android Toast Example

Android allows us to display a message without any button like 'OK' or 'Cancel'.

Its helps us to display a short message in short time.

Toast Example :

[sourcecode language="java"]

Toast.makeText(Classname.this, "Your Toast Text", Toast.LENGTH_SHORT).show();


The output will look like

toastmeessage without any button.

Look at the

Syndicate content