-->

Swipe a splash screen to get to a login screen (An

2020-08-03 08:57发布

问题:

I am developing an android application where currently: 1. splash screen displays 2. splash goes away and login screen appears

What I would like to happen is for the splash screen to stay on the screen until a user swipes the screen left or right which will then bring them to the login screen.

I am relatively new to this and have no idea how to go about implementing this. Any help would be greatly appreciated.

回答1:

There can be more than one way to achieve this -

1.) Use a View Pager approach - http://developer.android.com/training/animation/screen-slide.html

2.) You can detect swipe gesture and than start your login activity and finish Splash Activity. Take a look to start from here - http://goo.gl/Do3z71



回答2:

Use a ViewPager to achieve what you want:

http://developer.android.com/training/animation/screen-slide.html