FlexibleCalendar icon indicating copy to clipboard operation
FlexibleCalendar copied to clipboard

Circle representing selected day isnt entirely circular

Open zhanhui913 opened this issue 8 years ago • 2 comments

Hi there, just wondering if there is a way to have the calendar_data_cell_view.xml (the circle representing the selected day) to be circle (not oval) regardless of the size of the box representing the date.??

zhanhui913 avatar Jun 14 '16 15:06 zhanhui913

Problem is height of the cell is not equal to the width of the cell. Using InsetDrawable you should be able to get a circular view.

Try using this as a background. You might need to tweak left and right values.

<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/cell_background"
    android:insetRight="20dp"
    android:insetLeft="20dp" />

p-v avatar Jun 16 '16 07:06 p-v

@p-v Thanks, while it isnt the best solution; it worked well enough for my general purposes as the layout that the calendar view is in, isnt necessarily the same size all the time. I simply used different value dimen for different screen size.

Thanks for your help. Cheers,

zhanhui913 avatar Jun 20 '16 20:06 zhanhui913