Datepicker

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;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Adding button to the layout
b1=(Button)findViewById(R.id.Button01);
b1.setOnClickListener(this);
}
// Creating dialog
@Override
protected Dialog onCreat

Syndicate content