Skip to content

Instantly share code, notes, and snippets.

Avatar
🙄

Filip Skowron bezmian

🙄
View GitHub Profile
View build.gradle
dependencies {
compile 'agency.tango.android:material-intro-screen:{latest_release}'
}
View onFinish.java
@Override
public void onFinish() {
super.onFinish();
Toast.makeText(this, "Try this library in your project! :)", Toast.LENGTH_SHORT).show();
}
View nextBtnAnim.java
getNextButtonTranslationWrapper()
.setEnterTranslation(new IViewTranslation() {
@Override
public void translate(View view, @FloatRange(from = 0, to = 1.0) float percentage) {
view.setAlpha(percentage);
}
});
View IntroActivity.java
public class IntroActivity extends MaterialIntroActivity
View AndroidManifest.xml
<activity
android:name=".IntroActivity"
android:theme="@style/Theme.Intro" />
View customSlide.java
public class CustomSlide extends SlideFragment {
private CheckBox checkBox;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_custom_slide, container, false);
checkBox = (CheckBox) view.findViewById(R.id.checkBox);
return view;
}
View addSlide.java
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addSlide(new SlideFragmentBuilder()
.backgroundColor(R.color.colorPrimary)
.buttonsColor(R.color.colorAccent)
.possiblePermissions(new String[]{Manifest.permission.CALL_PHONE, Manifest.permission.READ_SMS})
.neededPermissions(new String[]{Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION})
.image(agency.tango.materialintroscreen.R.drawable.ic_next)