com.github.paolorotolo.appintro.AppIntroFragment Java Examples
The following examples show how to use
com.github.paolorotolo.appintro.AppIntroFragment.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AppIntroActivity.java From Stayfit with Apache License 2.0 | 6 votes |
@Override public void init(Bundle savedInstanceState) { // Instead of fragments, you can also use our default slide // Just set a title, description, background and image. AppIntro will do the rest. addSlide(AppIntroFragment.newInstance("Eye Catching Visuals", "Your Daily Statistics", R.drawable.appintro1, getResources().getColor(R.color.appintro1))); addSlide(AppIntroFragment.newInstance("Invite Friends", "Share A Run with them", R.drawable.appintro3, getResources().getColor(R.color.appintro3))); addSlide(AppIntroFragment.newInstance("", "Get Started", R.drawable.appintro4, getResources().getColor(R.color.appintro4))); // OPTIONAL METHODS // Override bar/separator color. setBarColor(Color.parseColor("#F44336")); setSeparatorColor(Color.parseColor("#2196F3")); // Hide Skip/Done button. showSkipButton(true); setProgressButtonEnabled(true); // Turn vibration on and set intensity. setVibrate(true); setVibrateIntensity(30); }
Example #2
Source File: TutorialActivity.java From ssj with GNU General Public License v3.0 | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Instead of fragments, you can also use our default slide // Just set a title, description, background and image. AppIntro will do the rest. addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.slide1_title), getResources().getString(R.string.slide1_text), R.drawable.logo, Color.parseColor("#0099CC"))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.slide2_title), getResources().getString(R.string.slide2_text), R.drawable.file, Color.parseColor("#BB8930"))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.slide3_title), getResources().getString(R.string.slide3_text), R.drawable.edit, Color.parseColor("#979797"))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.slide4_title), getResources().getString(R.string.slide4_text), R.drawable.eventconnections, Color.parseColor("#0F9D58"))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.slide5_title), getResources().getString(R.string.slide5_text), R.drawable.start, Color.parseColor("#4A82AE"))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.slide6_title), getResources().getString(R.string.slide6_text), R.drawable.tabs, Color.parseColor("#963aff"))); // OPTIONAL METHODS // Override bar/separator color. // setBarColor(Color.parseColor("#4A82AE")); // setSeparatorColor(Color.parseColor("#4A82AE")); // Hide Skip/Done button. showSkipButton(true); setProgressButtonEnabled(true); }
Example #3
Source File: IntroActivity.java From intra42 with Apache License 2.0 | 5 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); introCalendarFragment = IntroCalendarFragment.newInstance(); addSlide(introCalendarFragment); addSlide(IntroTranslationFragment.newInstance()); SliderPage sliderPage = new SliderPage(); sliderPage.setTitle(getString(R.string.introduction_cluster_map_contribute_title)); sliderPage.setDescription(getString(R.string.introduction_cluster_map_contribute_description)); sliderPage.setImageDrawable(R.drawable.intro_cluster_map_3); sliderPage.setBgColor(Color.parseColor("#9C27B0")); addSlide(AppIntroFragment.newInstance(sliderPage)); // OPTIONAL METHODS // Override bar/separator color. setBarColor(Color.parseColor("#00000000")); setSeparatorColor(Color.parseColor("#00000000")); // Hide Skip/Done button. showSkipButton(false); setProgressButtonEnabled(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) { pager.setOnApplyWindowInsetsListener(new View.OnApplyWindowInsetsListener() { @Override public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { return insets; } }); } }
Example #4
Source File: MinMinGuardIntro.java From MinMinGuard with GNU General Public License v3.0 | 5 votes |
@Override public void init(Bundle savedInstanceState) { addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.intro_auto_title), getResources().getString(R.string.intro_auto_content), R.drawable.intro1, Color.parseColor(GREEN_COLOR))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.intro_manual_title), getResources().getString(R.string.intro_manual_content), R.drawable.intro2, Color.parseColor(GREEN_COLOR))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.intro_tap_icon_title), getResources().getString(R.string.intro_tap_icon_content), R.drawable.intro3, Color.parseColor(GREEN_COLOR))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.intro_app_detail_title), getResources().getString(R.string.intro_app_detail_content), R.drawable.intro4, Color.parseColor(GREEN_COLOR))); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.intro_url_filtering_title), getResources().getString(R.string.intro_url_filtering_content), R.drawable.intro5, Color.parseColor(GREEN_COLOR))); }
Example #5
Source File: IntroduceActivity.java From GithubApp with Apache License 2.0 | 5 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); addSlide(AppIntroFragment.newInstance( getString(R.string.title_1), getString(R.string.title_font), getString(R.string.desc_1), getString(R.string.desc_font), R.drawable.ic_slide1, getResources().getColor(R.color.md_indigo_400) )); addSlide(AppIntroFragment.newInstance( getString(R.string.title_2), getString(R.string.title_font), getString(R.string.desc_2), getString(R.string.desc_font), R.drawable.ic_slide2, getResources().getColor(R.color.md_cyan_500) )); addSlide(AppIntroFragment.newInstance( getString(R.string.title_3), getString(R.string.title_font), getString(R.string.desc_3), getString(R.string.desc_font), R.drawable.ic_slide3, getResources().getColor(R.color.md_green_500) )); }
Example #6
Source File: MainIntro.java From FwdPortForwardingApp with GNU General Public License v3.0 | 5 votes |
@Override public void init(Bundle savedInstanceState) { // Instead of fragments, you can also use our default slide // Just set a title, description, background and image. AppIntro will do the rest. addSlide(AppIntroFragment.newInstance(getString(R.string.app_intro_1_title), getString(R.string.app_intro_1_text), R.drawable.appintro1, ContextCompat.getColor(this, R.color.colorPrimary))); addSlide(AppIntroFragment.newInstance(getString(R.string.app_intro_2_title), getString(R.string.app_intro_2_text), R.drawable.appintro2, ContextCompat.getColor(this, R.color.colorPrimary))); addSlide(AppIntroFragment.newInstance(getString(R.string.app_intro_3_title), getString(R.string.app_intro_3_text), R.drawable.appintro3, ContextCompat.getColor(this, R.color.colorPrimary))); showSkipButton(false); }
Example #7
Source File: IntroActivity.java From privatelocation with GNU General Public License v3.0 | 5 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); //fullscreen getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); //slider pages SliderPage sliderPageOne = new SliderPage(); sliderPageOne.setTitle(getResources().getString(R.string.slider_page_one_title)); sliderPageOne.setDescription(getString(R.string.slider_page_one_desc)); sliderPageOne.setImageDrawable(R.drawable.ic_intro_location); sliderPageOne.setBgColor(getResources().getColor(R.color.colorPrimary)); addSlide(AppIntroFragment.newInstance(sliderPageOne)); SliderPage sliderPageTwo = new SliderPage(); sliderPageTwo.setTitle(getResources().getString(R.string.slider_page_two_title)); sliderPageTwo.setDescription(getResources().getString(R.string.slider_page_two_desc)); sliderPageTwo.setImageDrawable(R.drawable.ic_intro_cloud); sliderPageTwo.setBgColor(getResources().getColor(R.color.colorIntroGrey)); addSlide(AppIntroFragment.newInstance(sliderPageTwo)); SliderPage sliderPageThree = new SliderPage(); sliderPageThree.setTitle(getResources().getString(R.string.slider_page_three_title)); sliderPageThree.setDescription(getResources().getString(R.string.slider_page_three_desc)); sliderPageThree.setImageDrawable(R.drawable.ic_intro_settings); sliderPageThree.setBgColor(getResources().getColor(R.color.colorIntroGreen)); addSlide(AppIntroFragment.newInstance(sliderPageThree)); //options setFadeAnimation(); showSkipButton(false); setProgressButtonEnabled(true); //setBarColor(getResources().getColor(R.color.colorPrimary)); //setSeparatorColor(getResources().getColor(R.color.white)); }
Example #8
Source File: AppIntroActivity.java From Lunary-Ethereum-Wallet with GNU General Public License v3.0 | 5 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); addSlide(AppIntroFragment.newInstance(getString(R.string.app_intro_title), getString(R.string.app_intro_text), R.drawable.ether_intro, Color.parseColor("#49627e"))); tosFragment = new ToSFragment(); addSlide(tosFragment); showSkipButton(false); setProgressButtonEnabled(true); }
Example #9
Source File: IntroActivity.java From PopCorn with Apache License 2.0 | 5 votes |
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); addSlide(AppIntroFragment.newInstance("Welcome to PopCorn", "Find and Discover your favourite Movies, TV Shows, Actors and more.", R.drawable.ic_launcher_large, Color.DKGRAY)); addSlide(AppIntroFragment.newInstance("Favorites", "Mark your Movies and TV Shows favourite.\nSo you never miss them again.", R.drawable.heart256, Color.DKGRAY)); addSlide(AppIntroFragment.newInstance("Explore", "Search your loved Movies and TV Shows from vast database.", R.drawable.search256, Color.DKGRAY)); addSlide(AppIntroFragment.newInstance("Share", "Share your Movies and TV Shows with friends.", R.drawable.share256, Color.DKGRAY)); showStatusBar(false); showSkipButton(true); setProgressButtonEnabled(true); }
Example #10
Source File: IntroActivity.java From habpanelviewer with GNU General Public License v3.0 | 5 votes |
private void addSlide(String title, String text, int icon, int bgColor) { SliderPage sp = new SliderPage(); sp.setTitle(title); sp.setDescription(text); sp.setBgColor(icon); sp.setImageDrawable(icon); addSlide(AppIntroFragment.newInstance(sp)); }
Example #11
Source File: SetupActivity.java From SystemUITuner2 with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setThings = new SetThings(this); //activity = this; TypedValue typedValue = new TypedValue(); Resources.Theme theme = getTheme(); theme.resolveAttribute(R.attr.colorAccent, typedValue, true); int backgroundColor = typedValue.data; AppIntroFragment introFrag = AppIntroFragment.newInstance(getResources().getText(R.string.app_name).toString(), getResources().getText(R.string.welcome).toString(), R.drawable.ic_launcher_large, backgroundColor); AppIntroBaseFragment askRootFrag = AskRoot.newInstance(getResources().getText(R.string.setup).toString(), getResources().getText(R.string.setup_ask).toString(), 0, backgroundColor); AppIntroBaseFragment noRootFrag = NoRoot.newInstance(getResources().getText(R.string.no_root_setup).toString(), getResources().getText(R.string.adb_instructions).toString(), 0, backgroundColor); AppIntroFragment doneFrag = AppIntroFragment.newInstance(getResources().getText(R.string.done_button).toString(), "", R.drawable.ic_check_accent, backgroundColor); addSlide(introFrag); addSlide(askRootFrag); addSlide(noRootFrag); addSlide(doneFrag); showSkipButton(false); setSwipeLock(true); finish_activity = new BroadcastReceiver() { @Override public void onReceive(Context arg0, Intent intent) { String action = intent.getAction(); if (action.equals("finish_systemuituner_activity")) { finish(); } } }; registerReceiver(finish_activity, new IntentFilter("finish_systemuituner_activity")); }
Example #12
Source File: IntroActivity.java From CatVision-io-SDK-Android with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Note here that we DO NOT use setContentView(); // Add your slide fragments here. // AppIntro will automatically generate the dots indicator and buttons. // addSlide(firstFragment); // Special custom fragments // Pairing #1 Fragment customFragment1 = new CustomIntroFragment(); Bundle b1 = new Bundle(); b1.putCharSequence("title", getResources().getString(R.string.intro_third_title)); b1.putCharSequence("description", getResources().getString(R.string.intro_third_text)); b1.putInt("image", R.drawable.cat3); b1.putInt("color", getResources().getColor(R.color.colorSlide3)); b1.putInt("type", TYPE_QR); customFragment1.setArguments(b1); // Pairing #2 Fragment customFragment2 = new CustomIntroFragment(); Bundle b2 = new Bundle(); b2.putCharSequence("title", getResources().getString(R.string.intro_fourth_title)); b2.putCharSequence("description", getResources().getString(R.string.intro_fourth_text)); b2.putInt("image", R.drawable.cat4); b2.putInt("color", getResources().getColor(R.color.colorSlide4)); b2.putInt("type", TYPE_DEEP); customFragment2.setArguments(b2); // Instead of fragments, you can also use our default slide // Just set a title, description, background and image. AppIntro will do the rest. firstFragment = AppIntroFragment.newInstance(getResources().getString(R.string.intro_first_title), getResources().getString(R.string.intro_first_text), R.drawable.cat1, getResources().getColor(R.color.colorSlide1)); addSlide(firstFragment); addSlide(AppIntroFragment.newInstance(getResources().getString(R.string.intro_second_title), getResources().getString(R.string.intro_second_text), R.drawable.cat2, getResources().getColor(R.color.colorSlide2))); addSlide(customFragment1); addSlide(customFragment2); lastFragment = AppIntroFragment.newInstance(getResources().getString(R.string.intro_fifth_title), getResources().getString(R.string.intro_fifth_text), R.drawable.cat5, getResources().getColor(R.color.colorSlide5)); addSlide(lastFragment); // setting the title setTitle(getResources().getString(R.string.intro_title_first)); // OPTIONAL METHODS // Override bar/separator color. setBarColor(getResources().getColor(R.color.colorPrimary)); // setSeparatorColor(Color.parseColor("#2196F3")); // Hide Skip/Done button. showSkipButton(true); setProgressButtonEnabled(true); // Turn vibration on and set intensity. // NOTE: you will probably need to ask VIBRATE permission in Manifest. // setVibrate(true); // setVibrateIntensity(30); mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); }
Example #13
Source File: IntroActivity.java From nitroshare-android with MIT License | 4 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); super.onCreate(savedInstanceState); setBarColor(ContextCompat.getColor(this, R.color.colorPrimaryDark)); addSlide(AppIntroFragment.newInstance( getString(R.string.activity_intro_intro_title), getString(R.string.activity_intro_intro_description), R.drawable.ic_intro_transfer, ContextCompat.getColor(this, R.color.colorPrimary) )); addSlide(AppIntroFragment.newInstance( getString(R.string.activity_intro_share_title), getString(R.string.activity_intro_share_description), R.drawable.ic_intro_share, ContextCompat.getColor(this, R.color.colorPrimary) )); addSlide(IntroDesktopFragment.newInstance( getString(R.string.activity_intro_desktop_title), getString(R.string.activity_intro_desktop_description), R.drawable.ic_intro_desktop, ContextCompat.getColor(this, R.color.colorPrimary) )); // Determine if the permission slide needs to be shown or not mShowPermissionSlide = !Permissions.haveStoragePermission(this); // We only need to ask for the permission if the user is running Marshmallow or higher; on // previous versions of Android permissions are granted by default if (mShowPermissionSlide) { addSlide(AppIntroFragment.newInstance( getString(R.string.activity_intro_perms_title), getString(R.string.activity_intro_perms_description), R.drawable.ic_intro_lock, ContextCompat.getColor(this, R.color.colorPrimary) )); } }
Example #14
Source File: PringIntro.java From AndroidSmartHome with Apache License 2.0 | 4 votes |
@Override public void init(Bundle savedInstanceState) { addSlide(AppIntroFragment.newInstance( "Teknologi Cloud", "Akses dan monitor rumah anda dimana saja, kapan saja dengan teknologi cloud", R.drawable.splash_access, Color.parseColor("#8bc34a")) ); addSlide(AppIntroFragment.newInstance( "Monitor Suhu", "Monitoring data suhu ruangan rumah anda", R.drawable.splash_suhu, Color.parseColor("#7e57c2")) ); addSlide(AppIntroFragment.newInstance( "Monitoring PDAM", "Memonitor pemakaian Air PDAM anda", R.drawable.splash_air, Color.parseColor("#ff9800")) ); addSlide(AppIntroFragment.newInstance( "Saklar Jarak jauh", "Kini anda tidak takut lupa mematikan lampu, karena dapat anda kontrol dari SmartPhone anda", R.drawable.splash_lampu, Color.parseColor("#ff5722")) ); addSlide(AppIntroFragment.newInstance( "Monitor Konsumsi Listrik", "Memonitor pemakaian pulsa listrik anda", R.drawable.splash_listrik, Color.parseColor("#03a9f4")) ); addSlide(AppIntroFragment.newInstance( "Tak perlu khawatir lagi pakai LPG", "Memonitor pemakaian gas LPG yang ada di dapur anda", R.drawable.splash_lpg, Color.parseColor("#7e57c2")) ); /* addSlide(AppIntroFragment.newInstance( "Notifikasi Pintar", "Pemberitahuan yang membuat anda selalu waspada", R.drawable.splash_notif, Color.parseColor("#7e57c2")) ); */ setProgressButtonEnabled(true); setDepthAnimation(); }
Example #15
Source File: IntroActivity.java From padland with Apache License 2.0 | 4 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Note here that we DO NOT use setContentView(); // Just set a title, description, background and image. AppIntro will do the rest. // addSlide(AppIntroFragment.newInstance(title, description, image, backgroundColor)); addSlide(AppIntroFragment.newInstance(getString(R.string.intro_first_title), getString(R.string.intro_first_desc), R.drawable.intro_image1, ContextCompat.getColor(this, R.color.intro_first_background))); addSlide(AppIntroFragment.newInstance(getString(R.string.intro_second_title), getString(R.string.intro_second_desc), R.drawable.intro_image2, ContextCompat.getColor(this, R.color.intro_second_background))); addSlide(AppIntroFragment.newInstance(getString(R.string.intro_third_title), getString(R.string.intro_third_desc), R.drawable.intro_image3, ContextCompat.getColor(this, R.color.intro_third_background))); addSlide(AppIntroFragment.newInstance(getString(R.string.intro_fourth_title), getString(R.string.intro_fourth_desc), R.drawable.intro_image4, ContextCompat.getColor(this, R.color.intro_fourth_background))); addSlide(LinkableAppIntroFragment.newInstance(getString(R.string.intro_fifth_title), getString(R.string.intro_fifth_desc), R.drawable.intro_image5, ContextCompat.getColor(this, R.color.intro_fifth_background))); // OPTIONAL METHODS // Override bar/separator color. // setBarColor(Color.parseColor("#3F51B5")); // setSeparatorColor(Color.parseColor("#2196F3")); // Hide Skip/Done button. showSkipButton(true); setProgressButtonEnabled(true); }
Example #16
Source File: IntroActivity.java From AcDisplay with GNU General Public License v2.0 | 4 votes |
@Override public void init(Bundle savedInstanceState) { addSlide(AppIntroFragment.newInstance( getString(R.string.intro_welcome_title), getString(R.string.intro_welcome_summary), R.drawable.ic_intro_app, 0xFF37474f)); addSlide(AppIntroFragment.newInstance( getString(R.string.intro_notifications_title), getString(R.string.intro_notifications_summary), R.drawable.ic_intro_notifications, 0xFF00695C)); // TODO: Get the color from current theme. int color = 0xFF888888; addSlide(AppIntroFragment.newInstance( getString(R.string.intro_am_title), Html.fromHtml(getString(R.string.intro_am_summary_skeleton, getString(R.string.intro_am_summary), getString(R.string.intro_settings_enable), Integer.toHexString(Color.red(color)) + Integer.toHexString(Color.green(color)) + Integer.toHexString(Color.blue(color)))).toString(), R.drawable.ic_intro_active_mode, 0xFF00838F)); // Update system ui visibility: hide nav bar and the // status bar. final View decorView = getWindow().getDecorView(); decorView.setOnSystemUiVisibilityChangeListener( new View.OnSystemUiVisibilityChangeListener() { public final void onSystemUiVisibilityChange(int f) { setSystemUiVisibilityFake(); decorView.postDelayed(new Runnable() { @Override public void run() { int visibility = SYSTEM_UI_BASIC_FLAGS | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN; decorView.setSystemUiVisibility(visibility); } }, 100); } } ); }
Example #17
Source File: IntroActivity.java From GotoSleep with GNU General Public License v3.0 | 4 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Note here that we DO NOT use setContentView(); // Instead of fragments, you can also use our default slide. // Just create a `SliderPage` and provide title, description, background and image. // AppIntro will do the rest. SliderPage firstSlide = new SliderPage(); firstSlide.setTitle(getString(R.string.introTitle1)); firstSlide.setDescription(getString(R.string.introDesc1)); firstSlide.setImageDrawable(R.drawable.ic_sleep); firstSlide.setBgColor(ContextCompat.getColor(this, R.color.firstSlide)); firstSlide.setTitleTypefaceFontRes(R.font.product_sans_bold); firstSlide.setDescTypefaceFontRes(R.font.product_sans_regular); SliderPage secondSlide = new SliderPage(); secondSlide.setTitle(getString(R.string.introTitle2)); secondSlide.setDescription(getString(R.string.introDesc2)); secondSlide.setImageDrawable(R.drawable.ic_alarm_clock); secondSlide.setBgColor(ContextCompat.getColor(this, R.color.secondSlide)); secondSlide.setTitleTypefaceFontRes(R.font.product_sans_bold); secondSlide.setDescTypefaceFontRes(R.font.product_sans_regular); SliderPage thirdSlide = new SliderPage(); thirdSlide.setTitle(getString(R.string.introTitle3)); thirdSlide.setDescription(getString(R.string.introDesc3)); thirdSlide.setImageDrawable(R.drawable.ic_copywriting); thirdSlide.setBgColor(ContextCompat.getColor(this, R.color.thirdSlide)); thirdSlide.setTitleTypefaceFontRes(R.font.product_sans_bold); thirdSlide.setDescTypefaceFontRes(R.font.product_sans_regular); SliderPage fourthSlide = new SliderPage(); fourthSlide.setTitle(getString(R.string.introTitle4)); fourthSlide.setDescription(getString(R.string.introDesc4)); fourthSlide.setImageDrawable(R.drawable.ic_bed); fourthSlide.setBgColor(ContextCompat.getColor(this, R.color.fourthSlide)); fourthSlide.setTitleTypefaceFontRes(R.font.product_sans_bold); fourthSlide.setDescTypefaceFontRes(R.font.product_sans_regular); setDoneTextTypeface(R.font.product_sans_bold); setColorTransitionsEnabled(true); addSlide(AppIntroFragment.newInstance(firstSlide)); addSlide(AppIntroFragment.newInstance(secondSlide)); addSlide(AppIntroFragment.newInstance(thirdSlide)); addSlide(AppIntroFragment.newInstance(fourthSlide)); // Hide Skip/Done button. showSkipButton(false); setProgressButtonEnabled(true); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); }
Example #18
Source File: MyIntro.java From IdeaTrackerPlus with MIT License | 3 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addSlide(AppIntroFragment.newInstance(getString(R.string.welcome), getString(R.string.welcome_content), R.drawable.launcher, ContextCompat.getColor(this, R.color.colorPrimary))); addSlide(AppIntroFragment.newInstance(getString(R.string.simple), getString(R.string.simple_content), R.drawable.fast_idea, ContextCompat.getColor(this, R.color.md_blue_400))); addSlide(AppIntroFragment.newInstance(getString(R.string.organized), getString(R.string.organized_content), R.drawable.focus_projects, ContextCompat.getColor(this, R.color.md_amber_400))); addSlide(AppIntroFragment.newInstance(getString(R.string.things_done), getString(R.string.things_done_content), R.drawable.multi_check, ContextCompat.getColor(this, R.color.md_red_400))); showStatusBar(false); }
Example #19
Source File: MyIntro.java From Pharmacy-Android with GNU General Public License v3.0 | 2 votes |
@Override public void init(@Nullable Bundle savedInstanceState) { Prefs.getInstance(this); addSlide(AppIntroFragment.newInstance("Order medicines", "From your home", R.drawable.house, Color.parseColor("#222222"))); // askForPermissions(new String[]{Manifest.permission.CAMERA}, 1); // OR addSlide(AppIntroFragment.newInstance("From your bed ", "You get it. :-)\n\n From Everywhere", R.drawable.bed, Color.parseColor("#00BCD4"))); addSlide(AppIntroFragment.newInstance("Just scan and order", "As easy as that \n\n" + "For this, we need your permission to take pictures and storage ", R.drawable.photo_camera, ContextCompat.getColor(this, R.color.md_teal_500))); askForPermissions(new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 3); addSlide(AppIntroFragment.newInstance("We just need", "Your phone number \n\n To verify you \n\n " + "P.S. This app is not compatible with your landphone", R.drawable.tel, Color.parseColor("#5C6BC0"))); askForPermissions(new String[]{Manifest.permission.READ_PHONE_STATE}, 4); addSlide(AppIntroFragment.newInstance("We just need", "Your permission to read the OTP \n\n " + "This app works fine even without this permission \n\n ", R.drawable.chat, ContextCompat.getColor(this, R.color.md_cyan_500))); askForPermissions(new String[]{Manifest.permission.RECEIVE_SMS}, 5); addSlide(AppIntroFragment.newInstance("We are nearly done", "In the next page click login", R.drawable.app_logo, ContextCompat.getColor(this, R.color.md_purple_500))); showStatusBar(false); // setSwipeLock(true); // showSkipButton(false); setFlowAnimation(); // setNextPageSwipeLock(true); // setCustomTransformer(new ZoomOutPageTransformer()); }