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


Java SliderPage.setTitle方法代码示例

本文整理汇总了Java中com.github.paolorotolo.appintro.model.SliderPage.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java SliderPage.setTitle方法的具体用法?Java SliderPage.setTitle怎么用?Java SliderPage.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.github.paolorotolo.appintro.model.SliderPage的用法示例。


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

示例1: createPageWith

import com.github.paolorotolo.appintro.model.SliderPage; //导入方法依赖的package包/类
private SliderPage createPageWith(@StringRes int title, @DrawableRes int drawable, @StringRes int description) {
    SliderPage page = new SliderPage();
    page.setTitle(context.getResources().getString(title));
    page.setImageDrawable(drawable);
    page.setDescription(context.getResources().getString(description));

    page.setBgColor(context.getResources().getColor(R.color.colorPrimary));
    page.setTitleTypeface(FONT_NAME_FULL);
    return page;
}
 
开发者ID:djuelg,项目名称:Neuronizer,代码行数:11,代码来源:SliderPageFactory.java

示例2: onCreate

import com.github.paolorotolo.appintro.model.SliderPage; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    SliderPage sliderPage1 = new SliderPage();
    sliderPage1.setTitle("Welcome!");
    sliderPage1.setDescription("Channelize helps you channel your focus on the work and boost your productivity.");
    sliderPage1.setImageDrawable(R.drawable.channelize);
    sliderPage1.setBgColor(Color.parseColor("#388e3c"));
    addSlide(AppIntroFragment.newInstance(sliderPage1));

    SliderPage sliderPage2 = new SliderPage();
    sliderPage2.setTitle("Plan your work");
    sliderPage2.setDescription("Use the app's list to add your tasks and organize them. " +
            "Tap on a task to start working on it.");
    sliderPage2.setImageDrawable(R.drawable.intro1);
    sliderPage2.setBgColor(Color.parseColor("#388e3c"));
    addSlide(AppIntroFragment.newInstance(sliderPage2));

    SliderPage sliderPage3 = new SliderPage();
    sliderPage3.setTitle("Put full attention");
    sliderPage3.setDescription("Break your tasks into focused work sessions, followed by regular breaks. " +
            "You can change the timer durations in the settings.");
    sliderPage3.setImageDrawable(R.drawable.intro2);
    sliderPage3.setBgColor(Color.parseColor("#388e3c"));
    addSlide(AppIntroFragment.newInstance(sliderPage3));

    showStatusBar(false);
    showSkipButton(false);
}
 
开发者ID:swapyx,项目名称:Channelize,代码行数:31,代码来源:IntroActivity.java

示例3: onCreate

import com.github.paolorotolo.appintro.model.SliderPage; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Random random = new Random();

    switch (random.nextInt(4))
    {

        case 0:
            setFadeAnimation();
            break;
        case 1:
            setZoomAnimation();
            break;
        case 2:
            setFlowAnimation();
            break;
        case 3:
            setSlideOverAnimation();
            break;
        case 4:
            setDepthAnimation();
            break;

    }

    SliderPage sliderPage1 = new SliderPage();
    sliderPage1.setTitle("Welcome!");
    sliderPage1.setDescription("This is a demo of the AppIntro library, with a custom background on each slide!");
    sliderPage1.setImageDrawable(R.mipmap.ic_launcher);
    sliderPage1.setBgColor(Color.TRANSPARENT);
    addSlide(AppIntroFragment.newInstance(sliderPage1));

    SliderPage sliderPage2 = new SliderPage();
    sliderPage2.setTitle("Clean App Intros");
    sliderPage2.setDescription("This library offers developers the ability to add clean app intros at the start of their apps.");
    sliderPage2.setImageDrawable(R.mipmap.ic_launcher);
    sliderPage2.setBgColor(Color.TRANSPARENT);
    addSlide(AppIntroFragment.newInstance(sliderPage2));

    SliderPage sliderPage3 = new SliderPage();
    sliderPage3.setTitle("Simple, yet Customizable");
    sliderPage3.setDescription("The library offers a lot of customization, while keeping it simple for those that like simple.");
    sliderPage3.setImageDrawable(R.mipmap.ic_launcher);
    sliderPage3.setBgColor(Color.TRANSPARENT);
    addSlide(AppIntroFragment.newInstance(sliderPage3));

    SliderPage sliderPage4 = new SliderPage();
    sliderPage4.setTitle("Explore");
    sliderPage4.setDescription("Feel free to explore the rest of the library demo!");
    sliderPage4.setImageDrawable(R.mipmap.ic_launcher);
    sliderPage4.setBgColor(Color.TRANSPARENT);
    addSlide(AppIntroFragment.newInstance(sliderPage4));

    // Declare a new image view
    ImageView imageView = new ImageView(this);

    // Bind a drawable to the imageview
   // imageView.setImageResource(R.mipmap.ic_launcher);

    // Set background color
    imageView.setBackgroundColor(Color.GRAY);

    // Set layout params
    imageView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));

    // Bind the background to the intro
    setBackgroundView(imageView);
}
 
开发者ID:HitRoxxx,项目名称:FloatingNew,代码行数:71,代码来源:CustomBackgroundIntro.java

示例4: onCreate

import com.github.paolorotolo.appintro.model.SliderPage; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    // Slides creation
    SliderPage sliderPage2 = new SliderPage();
    sliderPage2.setTitle(getResources().getString(R.string.slide2Title));
    sliderPage2.setDescription(getResources().getString(R.string.slide2Subtitle));
    sliderPage2.setImageDrawable(R.drawable.treasurechest);
    sliderPage2.setBgColor(getResources().getColor(R.color.slide2BgDark));

    // Slides creation
    SliderPage sliderPage3 = new SliderPage();
    sliderPage3.setTitle(getResources().getString(R.string.slide3Title));
    sliderPage3.setDescription(getResources().getString(R.string.slide3Subtitle));
    sliderPage3.setImageDrawable(R.drawable.crossedswords);
    sliderPage3.setBgColor(getResources().getColor(R.color.slide3Bg));

    SliderPage sliderPage4 = new SliderPage();
    sliderPage4.setTitle(getResources().getString(R.string.slide4Title));
    sliderPage4.setDescription(getResources().getString(R.string.slide4Subtitle));
    sliderPage4.setImageDrawable(R.drawable.shield_permissions);
    sliderPage4.setBgColor(getResources().getColor(R.color.slide4Bg));

    SliderPage sliderPage5 = new SliderPage();
    sliderPage5.setTitle(getResources().getString(R.string.slide5Title));
    sliderPage5.setDescription(getResources().getString(R.string.slide5Subtitle));
    sliderPage5.setImageDrawable(R.drawable.astronaut);
    sliderPage5.setBgColor(getResources().getColor(R.color.mainBg));


    // Including slides...
    addSlide(new SlideOneFragment());
    addSlide(AppIntroFragment.newInstance(sliderPage2));
    addSlide(AppIntroFragment.newInstance(sliderPage3));
    addSlide(AppIntroFragment.newInstance(sliderPage4));
    addSlide(AppIntroFragment.newInstance(sliderPage5));

    // Slider configuration
    showSeparator(false);
    showSkipButton(false);
    setProgressButtonEnabled(true);
    showStatusBar(false);
    setVibrate(false);
    setDepthAnimation();
    setDoneText(getString(R.string.end_intro));

    // Permissions
    askForPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 4);

}
 
开发者ID:Augugrumi,项目名称:SpaceRace,代码行数:53,代码来源:IntroActivity.java

示例5: onCreate

import com.github.paolorotolo.appintro.model.SliderPage; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Object conn = getLastCustomNonConfigurationInstance();
    if (conn != null) {
        // have the service connection survive through activity configuration changes
        // (e.g. screen orientation changes)
        mConnection = (LocServiceConnection) conn;
        mainService = mConnection.getBinder().getService();
        locBound = true;
    } else if (!locBound) {
        startService(new Intent(this, MainService.class));
        getApplicationContext().bindService(new Intent(getApplicationContext(), MainService.class), mConnection, Context.BIND_AUTO_CREATE);
    }

    SliderPage firstPage = new SliderPage();

    firstPage.setTitle(getString(R.string.intro_welcome_title));
    firstPage.setDescription(getString(R.string.intro_welcome_desc));
    firstPage.setImageDrawable(R.drawable.logo);
    firstPage.setBgColor(ContextCompat.getColor(this, R.color.colorPrimaryLight));
    firstPage.setTitleColor(Color.WHITE);
    firstPage.setDescColor(Color.WHITE);

    addSlide(AppIntroFragment.newInstance(firstPage));

    addSlide(DisturbancesIntroSlide.newInstance());

    addSlide(AnnouncementsIntroSlide.newInstance());

    SliderPage thirdPage = new SliderPage();

    thirdPage.setTitle(getString(R.string.intro_location_title));
    thirdPage.setDescription(getString(R.string.intro_location_desc));
    thirdPage.setImageDrawable(R.drawable.ic_compass_intro);
    thirdPage.setBgColor(Color.parseColor("#ED6A5A"));
    thirdPage.setTitleColor(Color.WHITE);
    thirdPage.setDescColor(Color.WHITE);

    addSlide(AppIntroFragment.newInstance(thirdPage));

    addSlide(FinishIntroSlide.newInstance());

    showStatusBar(true);

    showSkipButton(false);

    // Edit the color of the nav bar on Lollipop+ devices
    setNavBarColor(R.color.colorPrimaryDark);

    setZoomAnimation();
}
 
开发者ID:gbl08ma,项目名称:underlx,代码行数:54,代码来源:IntroActivity.java

示例6: onCreate

import com.github.paolorotolo.appintro.model.SliderPage; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);

    int lastSeenIntroduction = Configuration.getLastSeenIntroduction();

    SliderPage sliderPage = new SliderPage();
    sliderPage.setBgColor(getColor(R.color.explanationBackground));

    if (lastSeenIntroduction < 1) {
        // fresh installation

        sliderPage.setTitle(getString(R.string.introOfflineMapsTitle));
        String description = getString(R.string.introOfflineMaps);
        if (BuildConfig.FULL_VERSION) {
            description += " ";
            description += getString(R.string.introOfflineMapsFull);
        }
        sliderPage.setDescription(description);
        sliderPage.setImageDrawable(R.mipmap.maps);
        addSlide(IntroductionFragment.newInstance(sliderPage));

        sliderPage.setTitle(getString(R.string.introPlacesTitle));
        if (BuildConfig.FULL_VERSION)
            description = getString(R.string.introPlacesPrefixFull);
        else
            description = getString(R.string.introPlacesPrefix);
        description += " ";
        description += getString(R.string.introPlaces);
        sliderPage.setDescription(description);
        sliderPage.setImageDrawable(R.mipmap.places);
        addSlide(IntroductionFragment.newInstance(sliderPage));

        sliderPage.setTitle(getString(R.string.introTracksTitle));
        sliderPage.setDescription(getString(R.string.introTracks));
        sliderPage.setImageDrawable(R.mipmap.tracking);
        addSlide(IntroductionFragment.newInstance(sliderPage));

        sliderPage.setTitle(getString(R.string.introOffroadTitle));
        sliderPage.setDescription(getString(R.string.introOffroad));
        sliderPage.setImageDrawable(R.mipmap.offroad);
        addSlide(IntroductionFragment.newInstance(sliderPage));
    }

    if (lastSeenIntroduction < 3) {
        // 2017.11
        sliderPage.setTitle(getString(R.string.introHikingTitle));
        sliderPage.setDescription(getString(R.string.introHiking));
        sliderPage.setImageDrawable(R.mipmap.hiking);
        addSlide(IntroductionFragment.newInstance(sliderPage));

        sliderPage.setTitle(getString(R.string.introSkiingTitle));
        sliderPage.setDescription(getString(R.string.introSkiing));
        sliderPage.setImageDrawable(R.mipmap.skiing);
        addSlide(IntroductionFragment.newInstance(sliderPage));
    } else if (lastSeenIntroduction == 3) {
        // 2017.12
        sliderPage.setTitle(getString(R.string.introPistesTitle));
        sliderPage.setDescription(getString(R.string.introPistes));
        sliderPage.setImageDrawable(R.mipmap.pistes);
        addSlide(IntroductionFragment.newInstance(sliderPage));
    }

    // TODO Do not show more then N slides at once
}
 
开发者ID:andreynovikov,项目名称:trekarta,代码行数:68,代码来源:IntroductionActivity.java


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