EDIT 2: I found the problem, yet I don't know how to solve it..
The problem is the function that's called when a new item is selected.
In
@Override
public void onItemSelected(AdapterView_234<?> parent, View
view, int position, long id) {
}
I called a function that update's my view, which has two element: a
gallery and a textview. When a new item in the gallery is available,
the textview should be updated. The problem is that onItemSelected is
already called when my swipe is in the middle of the page, so the
update of the textview is done to early. I think the update of the
textview results in an update of my whole view, that's why the image
changes to early.
Does someone has a solution for this? Is it possible to raise an event
just AFTER the swipe is done?
On Nov 23, 7:57 am, Jens Aernouts <[email protected]> wrote:
> Hello,
>
> I want to disable the bouncing effect that you get when you swipe in a
> gallery. It’s explained
> here:http://stackoverflow.com/questions/4298060/android-disable-bounce-eff...
> I tried these solutions, but non of them work completely, the image
> still goes a bit to far, to come back and fix his location. (It’s
> faster, but that’s not what I won’t, the bounce should be completely
> gone!).
>
> Kind regards
>
> EDIT: After a bit of testing, if found that this is the problem: When
> you swipe the image from left to right (or vice versa), it will jump
> to the border when you got at the middle of the screen. So the new
> image is already completely in the view when you swiped the previous
> image just across the middle of the screen. Because you keep on
> sliding, the new image will also be slided a bit beyond the border of
> the screen. If you let it go after that, the image will center itself
> in the screen, that's why it looks like a bouncing effect.
>
> The weird thing is that I only have this when I called
> "Gallery.setOnItemSelectedListener(...)"! If I don't call that
> function, the image doesn't jump to the border, so the bouncing effect
> won't appear...
>
> I hope you can understand it, because it's very hard to explain!
>
> Kind regards
--
You received this message because you are subscribed to the Google Groups
"Android Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/android-discuss?hl=en.