本文整理汇总了Java中com.heinrichreimersoftware.materialintro.slide.SimpleSlide类的典型用法代码示例。如果您正苦于以下问题:Java SimpleSlide类的具体用法?Java SimpleSlide怎么用?Java SimpleSlide使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SimpleSlide类属于com.heinrichreimersoftware.materialintro.slide包,在下文中一共展示了SimpleSlide类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addSlide(new SimpleSlide.Builder()
.title("Add and remove tasks")
.description("With the same features as a typical task and more!")
.image(R.drawable.ic_onboarding_1)
.background(R.color.colorTeal).build());
addSlide(new SimpleSlide.Builder()
.title("Sync with all your devices")
.description("Sync all your tasks with all your devices instantly.")
.image(R.drawable.ic_onboarding_2)
.background(R.color.colorOrange).build());
addSlide(new SimpleSlide.Builder()
.title("As simple as 1, 2, 3")
.description("To add a task, simply tap the plus button and fill in the form, then click save.")
.image(R.drawable.ic_onboarding_3)
.background(R.color.colorLime).build());
autoplay(2500, INFINITE);
}
示例2: addIntroSlide
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
private void addIntroSlide() {
addSlide(new SimpleSlide.Builder()
.layout(R.layout.fragment_intro)
.title(R.string.intro_welcome_title)
.description(R.string.intro_welcome_desc)
.image(R.drawable.intro_welcome)
.background(R.color.colorPrimary)
.backgroundDark(R.color.colorPrimaryDark)
.canGoBackward(true)
.buttonCtaLabel(R.string.intro_get_started_button)
.buttonCtaClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
nextSlide();
}
})
.build());
}
示例3: addStartServiceSlide
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
private void addStartServiceSlide() {
SimpleSlide startServiceSlide = new SimpleSlide.Builder()
.layout(R.layout.fragment_intro)
.title(R.string.intro_start_service_title)
.description(R.string.intro_start_service_desc)
.image(R.drawable.intro_check)
.background(R.color.colorAccent)
.backgroundDark(R.color.colorAccentDark)
.canGoForward(true)
.buttonCtaLabel(R.string.start_service)
.buttonCtaClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startService(new Intent(AppIntroActivity.this, NLService.class));
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
preferences.edit().putBoolean(getString(R.string.notification_listener_service_state_key), true).apply();
NLService.setEnabled(true);
nextSlide();
}
})
.build();
addSlide(startServiceSlide);
}
示例4: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
setFullscreen(true);
super.onCreate(savedInstanceState);
addSlide(new SimpleSlide.Builder()
.layout(R.layout.schedules_help_1)
.background(R.color.schedule_help_background)
.backgroundDark(R.color.schedule_help_background_dark)
.build());
addSlide(new SimpleSlide.Builder()
.layout(R.layout.schedules_help_2)
.background(R.color.schedule_help_background)
.backgroundDark(R.color.schedule_help_background_dark)
.build());
addSlide(new SimpleSlide.Builder()
.layout(R.layout.schedules_help_3)
.background(R.color.schedule_help_background)
.backgroundDark(R.color.schedule_help_background_dark)
.build());
}
示例5: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setButtonCtaVisible(true);
setButtonNextVisible(false);
setButtonBackVisible(false);
setButtonCtaTintMode(BUTTON_CTA_TINT_MODE_TEXT);
addSlide(new SimpleSlide.Builder()
.title(R.string.app_name)
.description(R.string.welcome_to_Ọrin)
.image(R.drawable.icon_web)
.background(R.color.md_blue_grey_100)
.backgroundDark(R.color.md_blue_grey_200)
.layout(R.layout.fragment_simple_slide_large_image)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.label_playing_queue)
.description(R.string.open_playing_queue_instruction)
.image(R.drawable.tutorial_queue_swipe_up)
.background(R.color.md_deep_purple_500)
.backgroundDark(R.color.md_deep_purple_600)
.layout(R.layout.fragment_simple_slide_large_image)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.label_playing_queue)
.description(R.string.rearrange_playing_queue_instruction)
.image(R.drawable.tutorial_rearrange_queue)
.background(R.color.md_indigo_500)
.backgroundDark(R.color.md_indigo_600)
.layout(R.layout.fragment_simple_slide_large_image)
.build());
}
示例6: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
setFullscreen(true);
super.onCreate(savedInstanceState);
addSlide(new SimpleSlide.Builder()
.title(R.string.welcome)
.description(R.string.speed_up_learning)
.image(R.drawable.page1)
.background(R.color.colorDictionary)
.backgroundDark(R.color.colorAccent)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.create_sets)
.description(R.string.create_sets_desc)
.image(R.drawable.page2)
.background(R.color.colorTodo)
.backgroundDark(R.color.colorAccent)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.create_flashcards)
.description(R.string.create_flashcards_desc)
.image(R.drawable.page3)
.background(R.color.colorImportant)
.backgroundDark(R.color.colorAccent)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.study_flashcards)
.description(R.string.study_flashcards_desc)
.image(R.drawable.page4)
.background(R.color.colorOtherLabels)
.backgroundDark(R.color.colorAccent)
.build());
}
示例7: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setButtonBackVisible(false);
setButtonNextVisible(true);
setButtonCtaVisible(false);
setButtonCtaTintMode(BUTTON_CTA_TINT_MODE_TEXT);
addSlide(new SimpleSlide.Builder()
.title("Benvenuto su Schoolbook")
.description("Il tuo moderno registro elettronico non ufficiale per Classeviva di Spaggiari Infoschool.")
.image(R.mipmap.ic_launcher)
.background(R.color.colorPrimaryAmber)
.backgroundDark(R.color.colorPrimaryDarkAmber)
.build());
addSlide(new SimpleSlide.Builder()
.title("Permessi")
.description("Se sei su Marshmallow accetta i permessi. Serviranno in futuro per l'utilizzo dell'applicazione.")
.image(R.drawable.key)
.background(R.color.colorPrimary)
.backgroundDark(R.color.colorPrimaryDark)
.permission(Manifest.permission.RECORD_AUDIO)
.scrollable(true)
.build());
addSlide(new SimpleSlide.Builder()
.title("Perfetto")
.description("Adesso puoi iniziare la tua esplorazione! Se l'app ti piacerà ricorda di votarla sul PlayStore.")
.image(R.drawable.favorite)
.background(R.color.colorPrimaryOrange)
.backgroundDark(R.color.colorPrimaryDarkOrange)
.build());
}
示例8: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setButtonBackVisible(false);
setButtonNextVisible(false);
setButtonCtaVisible(true);
setButtonCtaTintMode(BUTTON_CTA_TINT_MODE_TEXT);
addSlide(new SimpleSlide.Builder()
.title(R.string.title_material_metaphor)
.description(R.string.description_material_metaphor)
.image(R.drawable.art_material_metaphor)
.background(R.color.color_material_metaphor)
.backgroundDark(R.color.color_dark_material_metaphor)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.title_material_bold)
.description(R.string.description_material_bold)
.image(R.drawable.art_material_bold)
.background(R.color.color_material_bold)
.backgroundDark(R.color.color_dark_material_bold)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.title_material_motion)
.description(R.string.description_material_motion)
.image(R.drawable.art_material_motion)
.background(R.color.color_material_motion)
.backgroundDark(R.color.color_dark_material_motion)
.build());
}
示例9: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
/**
* Standard fade (like Google's intros)
*/
addSlide(new SimpleSlide.Builder()
.title(R.string.intro_avoid_distractions)
.description(R.string.intro_avoid_distractions_description)
.image(R.drawable.intro01)
.background(R.color.teal)
.backgroundDark(R.color.teal)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.intro_clear_mind)
.description(R.string.intro_clear_mind_description)
.image(R.drawable.intro02)
.background(R.color.blue)
.backgroundDark(R.color.blue)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.intro_get_started)
.description(R.string.intro_get_started_description)
.image(R.drawable.intro03)
.background(R.color.darkGray)
.backgroundDark(R.color.darkGray)
.build());
}
示例10: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
addSlide(new SimpleSlide.Builder()
.title(R.string.title_1)
.description(R.string.description_1)
.image(R.drawable.ic_slide_1)
.background(R.color.colorSlide1)
.backgroundDark(R.color.colorSlide1Dark)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.title_2)
.description(R.string.description_2)
.image(R.drawable.ic_slide_2)
.background(R.color.colorSlide2)
.backgroundDark(R.color.colorSlide2Dark)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.title_3)
.description(R.string.description_3)
.image(R.drawable.ic_slide_3)
.background(R.color.colorSlide3)
.backgroundDark(R.color.colorSlide3Dark)
.build());
}
示例11: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setSkipEnabled(false);
addSlide(new SimpleSlide.Builder()
.title("Open Scout Public")
.description("Open Source Scouting. This is a public database and not subject to moderation.")
.image(R.drawable.logo)
.background(R.color.green)
.backgroundDark(R.color.greenDark)
.build());
addSlide(new SimpleSlide.Builder()
.title("How it Works")
.description("Events for this season are automatically imported and arranged by date.")
.image(R.drawable.blank_cards)
.background(R.color.purple)
.backgroundDark(R.color.purpleDark)
.build());
addSlide(new SimpleSlide.Builder()
.title("Event Dashboard")
.image(R.drawable.demo_cards)
.description("Each event has a page that includes your current stats, as well as all upcoming and past matches.")
.background(R.color.redAlt)
.backgroundDark(R.color.redDarkAlt)
.build());
addSlide(new FragmentSlide.Builder()
.background(R.color.colorPrimary)
.backgroundDark(R.color.colorPrimaryDark)
.fragment(SetupFragment.newInstance())
.build());
addOnNavigationBlockedListener(new OnNavigationBlockedListener() {
@Override
public void onNavigationBlocked(int position, int direction) {
Snackbar.make(findViewById(android.R.id.content), "Please Finish Setup First", Snackbar.LENGTH_LONG)
.show();
}
});
}
示例12: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setButtonCtaVisible(true);
setButtonNextVisible(false);
setButtonBackVisible(false);
setButtonCtaTintMode(BUTTON_CTA_TINT_MODE_TEXT);
addSlide(new SimpleSlide.Builder()
.title(R.string.app_name)
.description(R.string.welcome_to_phonograph)
.image(R.drawable.icon_web)
.background(R.color.md_blue_grey_100)
.backgroundDark(R.color.md_blue_grey_200)
.layout(R.layout.fragment_simple_slide_large_image)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.label_playing_queue)
.description(R.string.open_playing_queue_instruction)
.image(R.drawable.tutorial_queue_swipe_up)
.background(R.color.md_deep_purple_500)
.backgroundDark(R.color.md_deep_purple_600)
.layout(R.layout.fragment_simple_slide_large_image)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.label_playing_queue)
.description(R.string.rearrange_playing_queue_instruction)
.image(R.drawable.tutorial_rearrange_queue)
.background(R.color.md_indigo_500)
.backgroundDark(R.color.md_indigo_600)
.layout(R.layout.fragment_simple_slide_large_image)
.build());
}
示例13: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
LAUNCH_ACTIVITY_ANIM_BUNDLE = ActivityOptions.
makeCustomAnimation(AppIntroActivity.this,
R.transition.left_in,
R.transition.left_out).toBundle();
mPackageManager = getPackageManager();
boolean setupDone = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(getString(R.string.done_first_launch_key), false);
if (setupDone) { // Setup already finished once. So, this is repeat setup
new AlertDialog.Builder(AppIntroActivity.this)
.setTitle(getString(R.string.intro_setup_issues_title))
.setMessage(getString(R.string.intro_setup_issues_message))
.setPositiveButton(R.string.intro_setup_issues_ok, null)
.create()
.show();
}
// Introduction slide
addIntroSlide();
// Fitbit install slide
addFitbitInstallSlide();
// Enable notifications slide
addEnableNotificationAccessSlide();
// Fitbit setup - 3 steps (3 slides)
// Step 1
addSlide(new SimpleSlide.Builder()
.layout(R.layout.fragment_intro)
.title(R.string.intro_setup_fitbit_title1)
.description(R.string.intro_setup_fitbit_desc1)
.image(R.drawable.step_one)
.background(R.color.fitbitColor_intro)
.backgroundDark(R.color.fitbitColorDark_intro)
.build());
// Step 2
addSlide(new SimpleSlide.Builder()
.layout(R.layout.fragment_intro)
.title(R.string.intro_setup_fitbit_title2)
.description(R.string.intro_setup_fitbit_desc2)
.image(R.drawable.step_two)
.background(R.color.fitbitColor_intro)
.backgroundDark(R.color.fitbitColorDark_intro)
.build());
// Step 3
mLaunchFitbitSlide = createLaunchFitbitSlide();
addSlide(mLaunchFitbitSlide);
// App Choices slide
mAppChoicesSlide = createAppChoicesSlide();
addSlide(mAppChoicesSlide);
// Start service
addStartServiceSlide();
// Do not disturb mode announcement slide
addDNDModeSlide();
// Demo Slide
addDemoSlide();
setButtonBackVisible(true);
setButtonBackFunction(BUTTON_BACK_FUNCTION_BACK);
setButtonNextVisible(true);
setButtonNextFunction(BUTTON_NEXT_FUNCTION_NEXT_FINISH);
}
示例14: makeSlides
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
/**
* Create Slides for the intro pager.
* @return List of intro slides.
*/
private List<Slide> makeSlides() {
ArrayList<Slide> slides = new ArrayList<>();
slides.add(new FragmentSlide.Builder()
.fragment(R.layout.welcome_logo_slide)
.background(R.color.brown500)
.backgroundDark(R.color.brown700)
.build());
slides.add(new SimpleSlide.Builder()
.title(R.string.storage_permission_needed)
.description(R.string.storage_permission_rationale)
.image(R.drawable.welcome_micro_sd_card)
.background(R.color.red500)
.backgroundDark(R.color.red700)
.permission(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.build());
slides.add(new SimpleSlide.Builder()
.layout(R.layout.welcome_extra_text_slide)
.title(R.string.choose_library_dir)
.description(R.string.choose_library_dir_desc)
.image(R.drawable.welcome_book)
.background(R.color.orange500)
.backgroundDark(R.color.orange700)
.buttonCtaLabel(R.string.open_folder_chooser)
.buttonCtaClickListener(view -> onOpenFolderChooserClick())
.build());
slides.add(new SimpleSlide.Builder()
.title(R.string.title_restore_db)
.description(R.string.restore_database_desc)
.image(R.drawable.welcome_restore_database)
.background(R.color.blueGrey500)
.backgroundDark(R.color.blueGrey700)
.buttonCtaLabel(R.string.choose_database_backup)
.buttonCtaClickListener(view -> onRestoreDbClick())
.build());
slides.add(new SimpleSlide.Builder()
.title(R.string.ready_to_go)
.description(R.string.ready_to_go_desc)
.image(R.drawable.welcome_ready_to_go)
.background(R.color.green500)
.backgroundDark(R.color.green700)
.build());
return slides;
}
示例15: onCreate
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setButtonBackVisible(false);
setButtonNextVisible(false);
setButtonCtaVisible(true);
setButtonCtaTintMode(BUTTON_CTA_TINT_MODE_BACKGROUND);
TypefaceSpan labelSpan = new TypefaceSpan(
Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ? "sans-serif-medium" : "sans serif");
SpannableString label = SpannableString
.valueOf(getString(R.string.label_button_cta_canteen_intro));
label.setSpan(labelSpan, 0, label.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
setButtonCtaLabel(label);
setPageScrollDuration(500);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
setPageScrollInterpolator(android.R.interpolator.fast_out_slow_in);
}
addSlide(new SimpleSlide.Builder()
.title(R.string.title_canteen_intro1)
.description(R.string.description_canteen_intro1)
.image(R.drawable.art_canteen_intro1)
.background(R.color.color_canteen)
.backgroundDark(R.color.color_dark_canteen)
.layout(R.layout.slide_canteen)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.title_canteen_intro2)
.description(R.string.description_canteen_intro2)
.image(R.drawable.art_canteen_intro2)
.background(R.color.color_canteen)
.backgroundDark(R.color.color_dark_canteen)
.layout(R.layout.slide_canteen)
.build());
addSlide(new SimpleSlide.Builder()
.title(R.string.title_canteen_intro3)
.description(R.string.description_canteen_intro3)
.image(R.drawable.art_canteen_intro3)
.background(R.color.color_canteen)
.backgroundDark(R.color.color_dark_canteen)
.layout(R.layout.slide_canteen)
.build());
autoplay(2500, INFINITE);
}