当前位置: 首页>>代码示例>>Java>>正文


Java OnboarderPage类代码示例

本文整理汇总了Java中com.chyrta.onboarder.OnboarderPage的典型用法代码示例。如果您正苦于以下问题:Java OnboarderPage类的具体用法?Java OnboarderPage怎么用?Java OnboarderPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OnboarderPage类属于com.chyrta.onboarder包,在下文中一共展示了OnboarderPage类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.chyrta.onboarder.OnboarderPage; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    List<OnboarderPage> onboarderPages = new ArrayList<>();
    // Create your first page
    OnboarderPage onboarderPage1 = new OnboarderPage(getString(R.string.intro1_title), getString(R.string.intro1_text), R.drawable.ic_launcher_intro);
    OnboarderPage onboarderPage2 = new OnboarderPage(getString(R.string.intro2_title), getString(R.string.intro2_text), R.drawable.s_1);
    OnboarderPage onboarderPage3 = new OnboarderPage(getString(R.string.intro3_title), getString(R.string.intro3_text), R.drawable.s_2);
    OnboarderPage onboarderPage4 = new OnboarderPage(getString(R.string.intro4_title), getString(R.string.intro4_text), R.drawable.s_3);
    OnboarderPage onboarderPage5 = new OnboarderPage(getString(R.string.intro5_title), getString(R.string.intro5_text), R.drawable.s_4);


    // You can define title and description colors (by default white)
    onboarderPage1.setTitleColor(R.color.colorAccent);
    onboarderPage1.setBackgroundColor(R.color.colorPrimary_blue);
    onboarderPage2.setTitleColor(R.color.colorAccent);
    onboarderPage2.setBackgroundColor(R.color.colorPrimary_blue);
    onboarderPage3.setTitleColor(R.color.colorAccent);
    onboarderPage3.setBackgroundColor(R.color.colorPrimary_blue);
    onboarderPage4.setTitleColor(R.color.colorAccent);
    onboarderPage4.setBackgroundColor(R.color.colorPrimary_blue);
    onboarderPage5.setTitleColor(R.color.colorAccent);
    onboarderPage5.setBackgroundColor(R.color.colorPrimary_blue);

    // Add your pages to the fragments
    onboarderPages.add(onboarderPage1);
    onboarderPages.add(onboarderPage2);
    onboarderPages.add(onboarderPage3);
    onboarderPages.add(onboarderPage4);
    onboarderPages.add(onboarderPage5);
    // And pass your pages to 'setOnboardPagesReady' method
    setActiveIndicatorColor(R.color.colorLight);
    setInactiveIndicatorColor(R.color.colorLight_trans);
    shouldDarkenButtonsLayout(true);
    setSkipButtonHidden();
    setFinishButtonTitle(getString(R.string.intro_finish));
    setOnboardPagesReady(onboarderPages);
}
 
开发者ID:JaeNuguid,项目名称:Kids-Portal-Android,代码行数:39,代码来源:Activity_intro.java

示例2: populateOnboardingList

import com.chyrta.onboarder.OnboarderPage; //导入依赖的package包/类
private List<OnboarderPage> populateOnboardingList() {
    List<OnboarderPage> onboardingList = new ArrayList<>();

    onboardingList.add(new OnboarderPage(getString(R.string.title_onboard_0), getString(R.string.msg_onboard_0), R.drawable.onboarder_0));
    onboardingList.get(0).setBackgroundColor(R.color.onboarding_0);
    onboardingList.add(new OnboarderPage(getString(R.string.title_onboard_1), getString(R.string.msg_onboard_1), R.drawable.onboarder_1));
    onboardingList.get(1).setBackgroundColor(R.color.onboarding_1);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        onboardingList.add(new OnboarderPage(getString(R.string.title_onboard_2), getString(R.string.msg_onboard_2), R.drawable.onboarder_2));
        onboardingList.get(2).setBackgroundColor(R.color.onboarding_2);
    }

    return onboardingList;
}
 
开发者ID:GrenderG,项目名称:Tappic,代码行数:15,代码来源:OnboardingActivity.java

示例3: onCreate

import com.chyrta.onboarder.OnboarderPage; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    OnboarderPage onboarderPage1 = new OnboarderPage("JumpGo Dev Edition", "Welcome to the developer edition!", R.drawable.planet1);
    OnboarderPage onboarderPage2 = new OnboarderPage("Venus", "The love goddess", R.drawable.planet2);
    OnboarderPage onboarderPage3 = new OnboarderPage("Mars", "Say hi to Curiosity!", R.drawable.planet3);

    onboarderPage1.setBackgroundColor(R.color.onboarder_bg_1);
    onboarderPage2.setBackgroundColor(R.color.onboarder_bg_2);
    onboarderPage3.setBackgroundColor(R.color.onboarder_bg_3);

    List<OnboarderPage> pages = new ArrayList<>();

    pages.add(onboarderPage1);
    pages.add(onboarderPage2);
    pages.add(onboarderPage3);

    for (OnboarderPage page : pages) {
        page.setTitleColor(R.color.primary_text);
        page.setDescriptionColor(R.color.secondary_text);
        //page.setMultilineDescriptionCentered(true);
    }

    setSkipButtonTitle("Skip");
    setFinishButtonTitle("Finish");

    setOnboardPagesReady(pages);

}
 
开发者ID:JTechMe,项目名称:JumpGo,代码行数:31,代码来源:IntroActivity.java


注:本文中的com.chyrta.onboarder.OnboarderPage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。