Código:
public void onCreate1(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//This declares our GUI elements on the screen
dateDisplay = (EditText) findViewById(R.id.dateDisplay);
pickDate = (Button) findViewById(R.id.pickDate);
//This will show the date picker for each click on the button
pickDate.setOnClickListener(new View.OnClickListener() {
// @SuppressWarnings("deprecation")
@SuppressWarnings("deprecation")
public void onClick(View v) {
showDialog(DATE_DIALOG_ID);
//This will show us the current date
final Calendar c = Calendar.getInstance();
year = c.get(Calendar.YEAR);
month = c.get(Calendar.MONTH);
day = c.get(Calendar.DAY_OF_MONTH);
updateDate();
}
});
}


