CalendarView Android中的java更改fontfamily
有没有办法在Android Studio的standart CalendarView中更改字体系列? 我试图制作一个样式,但它只适用于构建后的字体颜色。在预览窗口中,日历将与我的字体系列一起显示
以下是我的风格:
<style name="CalendarDataTextStyle" parent="安卓:TextAppearance.DeviceDefault">
<item name="安卓:textColor">@color/colorBackOne</item>
<item name="安卓:fontFamily">@font/sen_bold</item>
</style>
<style name="CalendarWeeksTextStyle" parent="安卓:TextAppearance.DeviceDefault">
<item name="安卓:textColor">@color/colorGrey</item>
<item name="安卓:fontFamily">@font/sen_bold</item>
</style>
以下是我的日历视图:
<CalendarView
安卓:layout_width="wrap_content"
安卓:layout_height="wrap_content"
安卓:background="@drawable/calendar_back"
安卓:layout_marginTop="30sp"
安卓:dateTextAppearance="@style/CalendarDataTextStyle"
安卓:weekDayTextAppearance="@style/CalendarWeeksTextStyle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
共 (0) 个答案