本文整理匯總了Java中com.github.paolorotolo.appintro.AppIntroFragment類的典型用法代碼示例。如果您正苦於以下問題:Java AppIntroFragment類的具體用法?Java AppIntroFragment怎麽用?Java AppIntroFragment使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AppIntroFragment類屬於com.github.paolorotolo.appintro包,在下文中一共展示了AppIntroFragment類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle bundle=null;
bundle = getIntent().getExtras();
if(bundle!=null) {
proyectos = bundle.getParcelableArrayList("proyectos");
notificaciones = bundle.getParcelableArrayList("notificaciones");
usuarios = bundle.getParcelableArrayList("usuarios");
comentarios = bundle.getParcelableArrayList("comentarios");
}
//Añado los Slide para las instrucciones del Main
addSlide(AppIntroFragment.newInstance(getString(R.string.menu_lateral), getString(R.string.descripcion_instrucciones_menu), R.mipmap.pagina10, Color.parseColor("#29b6f6")));
addSlide(AppIntroFragment.newInstance(getString(R.string.muro), getString(R.string.descripcion_instrucciones_main), R.mipmap.pagina7, Color.parseColor("#29b6f6")));
addSlide(AppIntroFragment.newInstance(getString(R.string.filtro), getString(R.string.descripcion_instrucciones_filtro), R.mipmap.pagina9, Color.parseColor("#29b6f6")));
addSlide(AppIntroFragment.newInstance(getString(R.string.acciones), getString(R.string.descripcion_instrucciones_buenaidea), R.mipmap.pagina2, Color.parseColor("#29b6f6")));
addSlide(AppIntroFragment.newInstance(getString(R.string.comenta), getString(R.string.descripcion_instrucciones_comentarios), R.mipmap.pagina3, Color.parseColor("#29b6f6")));
addSlide(AppIntroFragment.newInstance(getString(R.string.informacion), getString(R.string.descripcion_instrucciones_informacion), R.mipmap.pagina2, Color.parseColor("#29b6f6")));
addSlide(AppIntroFragment.newInstance(getString(R.string.elementos), getString(R.string.descripcion_instrucciones_elemento), R.mipmap.pagina1, Color.parseColor("#29b6f6")));
addSlide(AppIntroFragment.newInstance(getString(R.string.chat), getString(R.string.descripcion_instrucciones_chat), R.mipmap.pagina6, Color.parseColor("#29b6f6")));
//Muestro el botón para saltarme las instrucciones
showSkipButton(true);
//Muestro un botón para pasar de slide
setProgressButtonEnabled(true);
}
示例2: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
showSkipButton(false);
Intent intent = getIntent();
type = intent.getStringExtra(KEY_SWITCH_FRAGMENT);
uuid = intent.getStringExtra(KEY_UUID);
title = intent.getStringExtra(KEY_TITLE);
SliderPageFactory factory = new SliderPageFactory(this);
List<SliderPage> pages = factory.createSlidesFromType(type);
for (SliderPage page : pages) {
addSlide(AppIntroFragment.newInstance(page));
}
}
示例3: onSlideChanged
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
public void onSlideChanged(Fragment oldFragment, Fragment newFragment) {
if (oldFragment instanceof AppIntroFragment) {
AppIntroFragment aif = (AppIntroFragment) oldFragment;
if (aif.getArguments().getInt("drawable") == R.drawable.ic_compass_intro && !requestedLocation) {
Log.d("osc", "Requesting permission");
requestedLocation = true;
SharedPreferences sharedPref = getSharedPreferences("settings", MODE_PRIVATE);
boolean locationEnabled = sharedPref.getBoolean("pref_location_enable", true);
if (locationEnabled &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
checkSelfPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, MainActivity.PERMISSIONS_REQUEST_CODE_ACCESS_COARSE_LOCATION);
}
}
}
setProgressButtonEnabled(!(newFragment instanceof FinishIntroSlide));
}
示例4: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setDepthAnimation();
// 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.first_screen), getString(R.string.scr1_desc), R.drawable.screen1, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.second_screen), getString(R.string.scr2_desc), R.drawable.screen2, ContextCompat.getColor(getApplicationContext(), R.color.accent)));
addSlide(AppIntroFragment.newInstance(getString(R.string.third_screen), getString(R.string.scr3_desc), R.drawable.screen3, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.fourth_screen), getString(R.string.scr4_desc), R.drawable.screen4, ContextCompat.getColor(getApplicationContext(), R.color.accent)));
addSlide(AppIntroFragment.newInstance(getString(R.string.fifth_screen), getString(R.string.scr5_desc), R.drawable.screen5, ContextCompat.getColor(getApplicationContext(), R.color.primary)));
addSlide(AppIntroFragment.newInstance(getString(R.string.six_screen), getString(R.string.scr6_desc), R.drawable.screen6, ContextCompat.getColor(getApplicationContext(), R.color.accent)));
// Hide Skip/Done button.
showSkipButton(false);
setProgressButtonEnabled(true);
// SHOW or HIDE the statusbar
showStatusBar(true);
}
示例5: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addSlide(AppIntroFragment.newInstance("Title here", "Description here...\nYeah, I've added this fragment programmatically",
R.drawable.ic_slide1, Color.parseColor("#2196F3")));
addSlide(AppIntroFragment.newInstance("HTML Description", Html.fromHtml("<b>Description bold...</b><br><i>Description italic...</i>"),
R.drawable.ic_slide1, Color.parseColor("#2196F3")));
setBarColor(Color.parseColor("#3F51B5"));
setSeparatorColor(Color.parseColor("#2196F3"));
showSkipButton(false);
setVibrate(true);
setVibrateIntensity(30);
}
示例6: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addSlide(AppIntroFragment.newInstance("Welcome!", "We just need some permissions to start. (This is only as an example...this app doesn't utilize any of the perms.)\n", R.drawable.ic_slide1, Color.parseColor("#2196F3")));
addSlide(AppIntroFragment.newInstance("Camera", "We need to use the camera.\n", R.drawable.ic_slide2, Color.parseColor("#2196F3")));
addSlide(AppIntroFragment.newInstance("Storage", "We need to save stuff on your device. \n", R.drawable.ic_slide3, Color.parseColor("#2196F3")));
addSlide(AppIntroFragment.newInstance("All Set!", "Enjoy our app! \n", R.drawable.ic_slide4, Color.parseColor("#2196F3")));
addSlide(AppIntroFragment.newInstance("Location", "One more permission! We need to locate your device. \n", R.drawable.ic_slide4, Color.parseColor("#2196F3")));
addSlide(AppIntroFragment.newInstance("All set!", "All done! \n", R.drawable.ic_slide4, Color.parseColor("#2196F3")));
// Ask Camera permission in the second slide
askForPermissions(new String[]{Manifest.permission.CAMERA}, 2);
// Ask Storage permission in the third slide
askForPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 3);
// Ask Location permission in the fifth slide
askForPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 5);
}
示例7: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@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);
}
示例8: init
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@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("Who is the best?", "Compare with Friends", R.drawable.appintro5, getResources().getColor(R.color.appintro2)));
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.
// NOTE: you will probably need to ask VIBRATE permisssion in Manifest.
setVibrate(true);
setVibrateIntensity(30);
}
示例9: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
// Note here that we DO NOT use setContentView();
// 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("Welcome to Remindr", "A simple and minimalistic to-do list, note taking, and reminder app.", R.drawable.ic_launcher_web, getResources().getColor(R.color.primary)));
addSlide(AppIntroFragment.newInstance("All your notes in one place", "Notes are in one place to avoid confusion and complexity. Long press or swipe away task cards to delete them.", R.drawable.empty_view_illustration, getResources().getColor(R.color.primary_dark)));
addSlide(AppIntroFragment.newInstance("Light and Dark", "Personalize your experience by choosing between light and dark theme.", R.drawable.start, Color.rgb(0,175,218)));
addSlide(AppIntroFragment.newInstance("Stay organized", "Stay on top of your tasks with timely reminders.", R.drawable.organized, Color.rgb(108, 207, 222)));
addSlide(AppIntroFragment.newInstance("Get started", "We hope you enjoy this app!", R.drawable.finish, Color.rgb(54, 64, 162)));
// Hide Skip/Done button.
showSkipButton(false);
setProgressButtonEnabled(true);
// Turn vibration on and set intensity.
// NOTE: you will probably need to ask VIBRATE permission in Manifest.
//setVibrate(true);
//setVibrateIntensity(30);
}
示例10: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((MyApplication) getApplication()).getDefaultTracker();
int color = ContextCompat.getColor(this, R.color.colorPrimaryDark);
setSkipButtonEnabled(false);
addSlide(AppIntroFragment.newInstance(getString(R.string.slide_radio),
getString(R.string.slide_radio_desc), R.drawable.slide_radio, color));
addSlide(AppIntroFragment.newInstance(getString(R.string.slide_reader),
getString(R.string.slide_reader_desc), R.drawable.slide_reader, color));
// TODO: Temporarily disabled on request of the radio station
/* addSlide(AppIntroFragment.newInstance(getString(R.string.slide_songs),
getString(R.string.slide_songs_desc), R.drawable.slide_songs, color));*/
addSlide(AppIntroFragment.newInstance(getString(R.string.slide_fav),
getString(R.string.slide_fav_desc), R.drawable.slide_fav, color));
// to avoid showing changelog after this intro
new ChangeLog(this).skipLogDialog();
}
示例11: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// first content: place
addSlide(AppIntroFragment.newInstance("Place your first flag",
"Jump into playing by dropping your flag. Finding a secluded spot is key!",
R.drawable.tutorial1_achieve,
ContextCompat.getColor(getApplicationContext(), R.color.colorSky)));
// second content: change
addSlide(AppIntroFragment.newInstance("Create your flag",
"When you place your flag, customize it by clicking the color. Remember, others will see this!",
R.drawable.tutorial2_color,
ContextCompat.getColor(getApplicationContext(), R.color.colorSky)));
// third content: capture
addSlide(AppIntroFragment.newInstance("Find and capture flags",
"Now go on the offensive! Follow the \"bloop\" sounds to find other players' flags. The more often you see the bloops, the closer you are. Happy hunting!",
R.drawable.tutorial3_overview,
ContextCompat.getColor(getApplicationContext(), R.color.colorSky)));
}
示例12: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
int primaryColor = ContextCompat.getColor(this, R.color.colorPrimary);
addSlide(AppIntroFragment.newInstance("Hello!", "Welcome to Aaikya!\n Your everyday leave tracker.",
R.drawable.human_greeting, primaryColor));
addSlide(AppIntroFragment.newInstance("Getting Started", "Add a new person to keep track of.",
R.drawable.plus_box, primaryColor));
addSlide(AppIntroFragment.newInstance("Add A Leave", "For the day from the main screen itself.\n\n Modify leaves for other days by selecting the person.",
R.drawable.list_view, primaryColor));
// Override bar/separator color.
setBarColor(primaryColor);
setSeparatorColor(ContextCompat.getColor(this, R.color.colorPrimaryLight));
// Hide Skip/Done button.
showSkipButton(true);
setProgressButtonEnabled(true);
}
示例13: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
setFadeAnimation();
// 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.intro1_title), getString(R.string.intro1_desc), R.drawable.proofmode512, getResources().getColor(R.color.colorPrimaryDark)));
addSlide(AppIntroFragment.newInstance(getString(R.string.intro2_title), getString(R.string.intro2_desc), R.drawable.ic_gps_fixed_white_48dp, getResources().getColor(R.color.colorPrimaryDark)));
addSlide(AppIntroFragment.newInstance(getString(R.string.intro3_title), getString(R.string.intro3_desc), R.drawable.ic_photo_filter_white_48dp, getResources().getColor(R.color.colorPrimaryDark)));
addSlide(AppIntroFragment.newInstance(getString(R.string.intro4_title), getString(R.string.intro4_desc), R.drawable.ic_assignment_white_48dp, getResources().getColor(R.color.colorPrimaryDark)));
// OPTIONAL METHODS
// Override bar/separator color.
// setBarColor(Color.parseColor("#3F51B5"));
// setSeparatorColor(Color.parseColor("#2196F3"));
// Hide Skip/Done button.
showSkipButton(false);
// setProgressButtonEnabled(false);
}
示例14: init
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
public void init(Bundle savedInstanceState) {
Intent intent = getIntent();
String title = intent.getStringExtra(EXTRA_TITLE);
String description = intent.getStringExtra(EXTRA_DESCRIPTION);
addSlide(AppIntroFragment.newInstance(title,
description,
R.drawable.ic_autorenew,
ContextCompat.getColor(this, R.color.colorPrimary)));
addSlide(getCredentialSlide());
showStatusBar(false);
setVibrate(false);
setVibrateIntensity(0);
setFadeAnimation();
}
示例15: onCreate
import com.github.paolorotolo.appintro.AppIntroFragment; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addSlide(AppIntroFragment.newInstance("Welkom", "Welkom bij de Jotihunt app voor de RP", R.drawable.rp_logo_500x500, Color.parseColor("#993333")));
addSlide(AppIntroFragment.newInstance("Kaart", "Bekijk de vossen, scouting-groepen, foto-opdrachten en de andere hunters op de kaart", R.drawable.map_example, Color.parseColor("#66ccff")));
addSlide(AppIntroFragment.newInstance("Waarnemen & melden", "Spot of hunt een vos via de app", R.drawable.spot_example, Color.parseColor("#99cc00")));
addSlide(AppIntroFragment.newInstance("Automatische Updates", "Wanneer de app actief is wordt alles automatisch bijgewerkt! Verander voorkeuren in de Instellingen onder updates", R.drawable.ic_action_refresh, Color.parseColor("#993399")));
// OPTIONAL METHODS
// Override bar/separator color.
setBarColor(Color.parseColor("#996633"));
setFadeAnimation();
// Hide Skip/Done button.
showSkipButton(true);
setProgressButtonEnabled(true);
// Turn vibration on and set intensity.
// NOTE: you will probably need to ask VIBRATE permisssion in Manifest.
setVibrate(true);
setVibrateIntensity(30);
}