Code example for DatePicker

Methods: init

0
	Date dateAnswer = new Date();
 
    /** {@inheritDoc} */ 
	@Override 
	protected View createView(Context c) {
		dp = new DatePicker(c);
		if (dateAnswer != null) {
			dp.init(dateAnswer.getYear() + 1900, dateAnswer.getMonth(), 
					dateAnswer.getDate(), null);
		} 
		return encapsulateQuestion(c, dp);
	} 
 
    /** {@inheritDoc} */ 
	@Override 
	public String getAnswer() {
		 if(!isViewActive()) 
			 return answer; 
		 else { 
			 dateAnswer = new Date(dp.getYear(), dp.getMonth(), 
Contextual code suggestions in your IDE  Get Codota for Java