DatePicker View drawing is no longer immediately reflected

Asked 2 years ago, Updated 2 years ago, 137 views

I use CalendarView for DatePicker on Android.

android:calendarViewShown="true"
android:spinnersShown="false"

However, after using it for a while, the drawing will not be reflected immediately.

Tap a date to not display the selected state (OnDateChangeListener.onSelectedDayChange is called but does not reflect only the drawing).
As soon as you scroll, the drawing is updated and the date you tap is finally displayed as selected.

Incidentally, instead of a dialog, we switch display and hide by switching the visibility of the parent's RelativeLayout, which includes DatePicker, to "visibility" and "invisible".
I have looked into various things, but it has not been resolved, so please give me some advice.

java android android-layout

2022-09-30 17:00

1 Answers

Among onSelectedDayChange,

view.invalidate();

Is it not possible to?


2022-09-30 17:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.