Go to next slide by code
Hi, Is there any way to go to next slide by code in a custom slide?
Currently no.
There is a work around to go to a next slide by code through simulating a key press. You can do this from your activity that extends MaterialIntroActivity:
dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_DPAD_RIGHT));
You can also call onKeyDown of MaterialIntroActivity directly with KEYCODE_DPAD_RIGHT
I believe this is a good feature to implement on a future release.
@brownpixel Hi, What about going to next slide by code in current SlideFragment.It seems it does not have any solutions
Hi @am2222,
Try this code in Activity, that extends MaterialIntroActivity
findViewById(R.id.button_next).performClick();
It work for me fine.
Even more so I'd like to move to the next page when the previous permission was granted. And this library just makes that so hard! Ah that would've been obvious and straightforward had i chosen to code it myself and not use a library :(