Installing a theme in a DatePicker layout and adding android:textSize for it works for me.
In your xml layout add a DatePicker applying the theme as below -
<DatePicker xmlns:android="http://schemas.android.com/apk/res/android" android:theme="@style/NumberPickerStyle" android:datePickerMode="spinner" android:calendarViewShown="false" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:layout_width="wrap_content"/>
and then define the NumberPickerStyle in styles.xml indicating android:textSize like this -
<style name="NumberPickerStyle"> <item name="android:textSize">@dimen/number_picker_text_size</item> </style>
shubham1g5
source share