I have a ViewSwitcher that displays views. When the ViewSwitcher starts the initial view does not scroll.
final ViewSwitcher vs = (ViewSwitcher)getView().findViewById(R.id.view_switcherz);
mEventResource = new AlternateEventResource();
mViewFactory = new AlternateDayViewFactory(vs, mEventResource, getActivity());
vs.setFactory(mViewFactory);
final DayView dv = (DayView) vs.getCurrentView();
Time t = new Time();
t.set(setTime.getTimeInMillis());
dv.setSelected(t, false, false);
dv.clearCachedEvents();
dv.reloadEvents()
I have an application that uses a ViewSwitcher
.
When initialising the ViewSwitcher
, the view that is first displayed when scrolled causes a motion event that calls the onFling()
method.
However the onFling()
animation is not performed.
When the ViewSwitcher
view is swiped to the second view the onFling()
event starts functioning normally.
What could cause an onFling()
to be called but simply ignored?
I have traced the code with a debugger and the onFling()
is called but doesn't actually deliver any animation but only on the initial view.
Thanks. Source that I use can be pulled here to view problem!
git clone https://code.google.com/p/yadview/