This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity | |
android:name=".IntroActivity" | |
android:theme="@style/Theme.Intro" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
compile 'agency.tango.android:material-intro-screen:{latest_release}' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onFinish() { | |
super.onFinish(); | |
Toast.makeText(this, "Try this library in your project! :)", Toast.LENGTH_SHORT).show(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getNextButtonTranslationWrapper() | |
.setEnterTranslation(new IViewTranslation() { | |
@Override | |
public void translate(View view, @FloatRange(from = 0, to = 1.0) float percentage) { | |
view.setAlpha(percentage); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IntroActivity extends MaterialIntroActivity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |