Android Open Source - DatePicker Main Activity






From Project

Back to project page DatePicker.

License

The source code is released under:

Apache License

If you think the Android project DatePicker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.chenglei.widget.datepicker.Sample;
//from  w ww  .java  2s  .com
import org.chenglei.widget.datepicker.DatePicker;
import org.chenglei.widget.datepicker.Sound;

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

public class MainActivity extends Activity {
  
  private DatePicker mDatePicker;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    mDatePicker = (DatePicker) findViewById(R.id.date_picker);
    
    Sound sound = new Sound(this);
    //sound.setCustomSound(R.raw.beep);
    mDatePicker.setSoundEffect(sound);
    mDatePicker.setSoundEffectsEnabled(true);
  }
}




Java Source Code List

org.chenglei.widget.datepicker.DatePicker.java
org.chenglei.widget.datepicker.NumberPicker.java
org.chenglei.widget.datepicker.Sound.java
org.chenglei.widget.datepicker.Sample.MainActivity.java