Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android calendarview font size

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>
like image 492
A.Awada Avatar asked Sep 12 '26 02:09

A.Awada


1 Answers

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!

like image 106
edwoollard Avatar answered Sep 13 '26 17:09

edwoollard