Below lines of coding, I can show Date Widget. Now i want to handle the events. i don't know how to handle it
for Example, if i click on the calendar message box will display with that date.
Using java Syntax Highlighting
- import java.util.Calendar;
- import android.app.Activity;
- import android.os.Bundle;
- import android.widget.DatePicker;
- public class showdate extends Activity {
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle icicle)
- {
- super.onCreate(icicle);
- setContentView(R.layout.main);
- DatePicker dp = (DatePicker)this.findViewById(R.id.date);
- // for example init to 1/27/2008, no callback
- dp.init(2008, 0, 27, Calendar.MONDAY, null);
- }
- }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <AbsoluteLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- xmlns:android="http://schemas.android.com/apk/res/android"
- >
- <DatePicker
- android:id="@+id/date"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_x="0px"
- android:layout_y="0px"
- >
- </DatePicker>
- </AbsoluteLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
any one help me solve this problem please...
Thanks in advance




