DatePicker的使用(三):初始化

package com.example.androidtest;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.app.DatePickerDialog;
import android.app.TimePickerDialog;
import android.app.Dialog;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.TimePicker;
import android.widget.Toast;
import android.util.Log;

import java.text.DateFormat;
import java.util.Calendar;



public class MainActivity extends Activity {
	
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		DatePicker dp = (DatePicker)findViewById(R.id.date_picker);
		dp.init(2014, 4, 8, null);
	}	
	
	
	
	
	
}





  






你可能感兴趣的:(android)