prolificinteractive / material-calendarview

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

Can I change event dot position? #1012

Open rb0071 opened 4 years ago

rb0071 commented 4 years ago

Current version event dot position shows under date number but I want to show Top-right of date.

adityabhaskar commented 4 years ago
  1. Create a drawable to show a dot on the top right.

    <?xml version="1.0" encoding="utf-8"?>
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:gravity="top|end">
        <shape android:shape="oval">
            <solid android:color="@color/primaryColor" />
            <size
                android:width="5dp"
                android:height="5dp" />
        </shape>
    </item>
    </layer-list>
  2. In decorate method of the EventDecorator, set it as background: view.setBackgroundDrawable(drawable)

That should show a dot on top right (end) of the date.