ITEEDU

TimePicker日期选择器

package com.iteedu.timepicker;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TimePicker;

public class MainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TimePicker tp=(TimePicker)findViewById(R.id.TimePicker01);
        tp.setIs24HourView(true);
    }
}