Swipe a splash screen to get to a login screen (Android Application)

随声附和 提交于 2019-12-06 14:57:40

问题


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



来源:https://stackoverflow.com/questions/21941314/swipe-a-splash-screen-to-get-to-a-login-screen-android-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!