prolificinteractive / material-calendarview

A Material design back port of Android's CalendarView
https://prolificinteractive.github.io/material-calendarview/
MIT License
5.91k stars 1.32k forks source link

Custom Fonts never works with this Library #1110

Open Ankit0080 opened 3 years ago

Ankit0080 commented 3 years ago
<style name="weekTextStyle" parent="android:TextAppearance">
    <item name="fontPath">assets/NotoSans-Medium.ttf</item>
</style>

<style name="dateTextStyle" parent="android:TextAppearance">
    <item name="fontPath">NotoSans-Medium.ttf</item>
</style>

binding.materialCalendarView.setShowOtherDates(MaterialCalendarView.SHOW_OUT_OF_RANGE); binding.materialCalendarView.setWeekDayTextAppearance(R.style.headerView); // binding.materialCalendarView.setHeaderTextAppearance(R.style.headerView); binding.materialCalendarView.setDateTextAppearance(R.style.dateTextStyle); binding.materialCalendarView.addDecorator(oneDayDecorator); binding.materialCalendarView.setTopbarVisible(false); binding.materialCalendarView.setDynamicHeightEnabled(true);

<com.prolificinteractive.materialcalendarview.MaterialCalendarView android:layout_marginTop="@dimen/dp_10" android:layout_marginLeft="@dimen/dp_10" android:layout_marginRight="@dimen/dp_10" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/materialCalendarView" android:layout_width="match_parent" android:layout_height="wrap_content" app:mcv_showOtherDates="decorated_disabled" app:mcv_calendarMode="month" app:mcv_tileHeight="@dimen/dp_35" app:mcv_selectionMode="single" app:mcv_headerTextAppearance="@style/headerView" app:mcv_weekDayTextAppearance="@style/weekTextStyle" app:mcv_dateTextAppearance="@style/dateTextStyle" app:mcv_showWeekDays="true" app:mcv_selectionColor="#adc93b" />

implementation 'com.github.prolificinteractive:material-calendarview:2.0.1'

I have been trying to implement all the ways to use custom fonts in this library but this library doesn't support custom fonts. i have used calligraphy and followed #582 but nothing works