android-times-square icon indicating copy to clipboard operation
android-times-square copied to clipboard

If calendar doesn't take up all of the width it renders wrong when selecting a date

Open kjeremy opened this issue 9 years ago • 3 comments

If I select a date (after scrolling down) and then scroll up the calendar will draw two months sort of on top of each other.

This occurs if I have the following:

<FrameLayout
        android:layout_width="0dp"
        android:layout_height="fill_parent"
        android:layout_weight="2">
        <com.squareup.timessquare.CalendarPickerView
            android:id="@+id/calendar_view"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:paddingBottom="16dp"
            android:scrollbarStyle="outsideOverlay"
            android:clipToPadding="false" />
    </FrameLayout>

If I change the FrameLayout to have a layout_width of wrap_content or fill_parent the problem doesn't occur.

kjeremy avatar Apr 24 '15 12:04 kjeremy

See http://screencast.com/t/TrMp7Thwx for a screencast

kjeremy avatar Apr 24 '15 14:04 kjeremy

@kjeremy can you try to create a small reproducible test case? (maybe as a PR against the sample app?). This looks crazy and I have no idea how to start trying to repro.

edenman avatar Apr 24 '15 18:04 edenman

I'll see if I can't come up with something this weekend. It's hosted in a view pager if that's any help...

kjeremy avatar Apr 24 '15 21:04 kjeremy