pli
pli

Reputation: 935

Android CalendarView/TimePicker not working inside ScrollView

I am making a form and eventually had to encapsulate my LinearLayout inside a ScrollView so the soft keyboard would not cover up some of the fields.

After I did this my CalendarView and TimePicker which are used in the form are not working anymore. You can not scroll between months at all in the CalendarView, and the TimePicker only moves about one hour or minute per swipe.

The form itself does not quite fill the screen, so it does not require any scrolling with the soft keyboard down. With the keyboard up and the whole form scrollable, I noticed that after the initial small movement of the TimePicker's rotating wheels the whole form starts moving instead.


So, does the ScrollView capture the motion that would be needed to scroll the calendar and time? I have not been able to figure out a solution to this. Any suggestions?

Upvotes: 2

Views: 2093

Answers (1)

user1447767
user1447767

Reputation:

Try setting FillViewPort to true on the ScrollView. This will at least work if only one of such widgets is visible.

Upvotes: 3

Related Questions