Setting a theme to DatePicker
layout and adding android:textSize
to it works for me.
In your layout's xml add a DatePicker
applying a theme as shown 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
specifying android:textSize
like this -
<style name="NumberPickerStyle">
<item name="android:textSize">@dimen/number_picker_text_size</item>
</style>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…