Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class IntroActivity extends MaterialIntroActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- addSlide(new SlideFragmentBuilder()
- .backgroundColor(R.color.orange_intro)
- .buttonsColor(R.color.whiteTransparent)
- .image(R.drawable.ic_magnifier_dollar_gold)
- .title(getString(R.string.looking_for_Easy_Money))
- .description(getString(R.string.we_are_happy_to_help))
- .build());
- addSlide(new SlideFragmentBuilder()
- .backgroundColor(R.color.green)
- .buttonsColor(R.color.whiteTransparent)
- .image(R.drawable.ic_google_play_logo)
- .title(getString(R.string.find_and_install_intro))
- .description(getString(R.string.find_the_app_on_Google_Play_and_install))
- .build());
- addSlide(new SlideFragmentBuilder()
- .backgroundColor(R.color.blue)
- .buttonsColor(R.color.whiteTransparent)
- .image(R.drawable.ic_gamepad)
- .title(getString(R.string.launch_the_application))
- .description(getString(R.string.run_the_application_for_at_least_30_seconds))
- .build());
- addSlide(new SlideFragmentBuilder()
- .backgroundColor(R.color.grey)
- .image(R.drawable.ic_clock_with_padding)
- .buttonsColor(R.color.whiteTransparent)
- .title(getString(R.string.save_for_3_days))
- .description(getString(R.string.dont_uninstall_the_app_for_3_days))
- .build());
- addSlide(new SlideFragmentBuilder()
- .image(R.drawable.ic_transaction)
- .backgroundColor(R.color.red_pastel)
- .buttonsColor(R.color.whiteTransparent)
- .title(getString(R.string.get_the_reward))
- .build());
- addSlide(new SlideFragmentBuilder()
- .backgroundColor(R.color.ametist)
- .buttonsColor(R.color.whiteTransparent)
- .image(R.drawable.ic_users)
- .title(getString(R.string.invite_friends))
- .description(getString(R.string.invite_friends_with_your_promocode))
- .build());
- addSlide(new DangerSlide());
- addSlide(new SlideFragmentBuilder()
- .backgroundColor(R.color.green_sea)
- .buttonsColor(R.color.whiteTransparent)
- .image(R.drawable.ic_gears_white)
- .neededPermissions(new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION})
- .description(getString(R.string.permissions_slide_description))
- .build(),
- new MessageButtonBehaviour(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- findViewById(R.id.button_next).performClick();
- }
- }, getString(R.string.action_continue)));
- addSlide(new SlideFragmentBuilder()
- .backgroundColor(R.color.blue_light)
- .buttonsColor(R.color.whiteTransparent)
- .image(R.drawable.ic_chat)
- .title(getString(R.string.there_were_questions))
- .description(getString(R.string.apply_to_support))
- .build());
- addSlide(new SlideFragmentBuilder()
- .backgroundColor(R.color.colorPrimary)
- .buttonsColor(R.color.whiteTransparent)
- .image(R.drawable.ic_dollar)
- .title(getString(R.string.start_earning_right_now))
- .build());
- }
- @Override
- public void onFinish() {
- super.onFinish();
- Config.setIntroViewed(true);
- Intent myIntent;
- myIntent = new Intent(this, MainActivity.class);
- myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- myIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
- startActivity(myIntent);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement