A
A
Alexey2012-07-30 20:45:41
Android
Alexey, 2012-07-30 20:45:41

How to switch between activities with a finger? :)?

I want to make it so that you can switch between two different Activities with a slide with your finger to the side. Like how in the official client for VK a “menu” opens on the left (only there, as I understand it, something like ViewFlipper is used).
Poke an example or hint how?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Isakov, 2012-07-30
@kwikpik

Smooth scrolling between activities will not work, only if you scroll through different views within the same activity

L
LeoCcoder, 2012-07-30
@LeoCcoder

Just like in ViewFlipper, it’s unlikely to succeed, switch between fragments, not activation. For fragments, everything is already there to achieve the desired effect.
The activity has the ability to set an animation that removes the old activity and displays a new one. You can make the old one go to the left of the screen, and the new one goes to the right. We detect a gesture, send an intent to launch a new activity. But how to make sure that the change of the active is synchronous with the movement of the finger on the screen (so that half of one active and half of the other can be seen and that these images follow exactly the finger).

M
Maxim, 2012-07-31
@Bublik

The menu on the left is a different pattern, this is habrahabr.ru/post/148730/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question