커스텀 한것도 아니고...아래와 같이 생성해서 보여주는데
에뮬로 API 22돌렸을 땐 달력이 포함되서 나오고
API 19로 돌렸을 때는 다이얼로그처럼 나옵니다.(전혀 형태가 다르게 나온다는 것이 의아..)
하나로 일치시켜서 보여주고 싶은데...뭘 건드려야 하나요??
GregorianCalendar calendar = new GregorianCalendar();
year = calendar.get(Calendar.YEAR);
month = calendar.get(Calendar.MONTH);
day= calendar.get(Calendar.DAY_OF_MONTH);
DatePickerDialog datePicker = new DatePickerDialog(this, dateSetListener, year, month, day);
datePicker.show();
private DatePickerDialog.OnDateSetListener dateSetListener = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
String msg = String.format("%d / %d / %d", year,monthOfYear+1, dayOfMonth);
Toast.makeText(DateTestActivity.this, msg, Toast.LENGTH_SHORT).show();
}
};
참고로 어플 테마는 아래와 같습니다.
<resources>
<style name="AppTheme" parent="AppTheme.Base" >
<!-- Base application theme.
Defining this lets values-v21/styles.xml reuse it with changes. -->
</style>
<!--<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">-->
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- colorPrimary is used, for instance, for the default ActionBar
(but not Toolbar) background.
We specify the same color for the toolbar background in
toolbar.xml.. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/logo_green</item>
</style>
</resources>