I am using Xamarin for building android application this is my first app. I have a CalendarView I need to change the font size and style of the day.
I tried the below code the font color changed but the size is too small. The minimum API level is 11 and target API level is 16. I am using galaxy note 2 for testing.
<style name="Widget.CalendarView.Custom" parent="@android:style/Widget.CalendarView">
<item name="android:focusedMonthDateColor">@color/gray</item>
<item name="android:weekDayTextAppearance">@android:style/TextAppearance.Medium</item>
<item name="android:dateTextAppearance">?android:attr/textAppearanceLarge</item>
<item name="android:selectedWeekBackgroundColor">@android:color/transparent</item>
</style>
All you need to do is reference a different style that includes a slightly bigger font for the size of the date. I'm not exactly sure why yours isn't working using the styles.xml as it seems correct. However I would just simply add it to the XML attributes for the calendar. This will be fine as presumably you're only using one Calendar and therefore it isn't really inefficient. Add this line to the calendar XML:
android:dateTextAppearance="@android:style/TextAppearance.Large"
Hope this helps you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With