@@ -17,6 +17,7 @@ public class TutorialItem implements Parcelable {
1717 private int backgroundImageRes = -1 ;
1818 private int titleTextRes = -1 ;
1919 private int subTitleTextRes = -1 ;
20+ private boolean isGif = false ;
2021
2122 public TutorialItem (@ NonNull String titleText , @ Nullable String subTitleText , @ ColorRes int backgroundColor , @ DrawableRes int foregroundImageRes , @ DrawableRes int backgroundImageRes ) {
2223 this .titleText = titleText ;
@@ -33,6 +34,14 @@ public TutorialItem(@NonNull String titleText, @Nullable String subTitleText, @C
3334 this .foregroundImageRes = foregroundImageRes ;
3435 }
3536
37+ public TutorialItem (@ NonNull String titleText , @ Nullable String subTitleText , @ ColorRes int backgroundColor , @ DrawableRes int foregroundImageRes , boolean isGif ) {
38+ this .titleText = titleText ;
39+ this .subTitleText = subTitleText ;
40+ this .backgroundColor = backgroundColor ;
41+ this .foregroundImageRes = foregroundImageRes ;
42+ this .isGif = isGif ;
43+ }
44+
3645 public TutorialItem (@ StringRes int titleTextRes , @ StringRes int subTitleTextRes , @ ColorRes int backgroundColor , @ DrawableRes int foregroundImageRes , @ DrawableRes int backgroundImageRes ) {
3746 this .titleTextRes = titleTextRes ;
3847 this .subTitleTextRes = subTitleTextRes ;
@@ -76,6 +85,10 @@ public int getSubTitleTextRes() {
7685 return subTitleTextRes ;
7786 }
7887
88+ public boolean isGif () {
89+ return isGif ;
90+ }
91+
7992 @ Override
8093 public int describeContents () {
8194 return 0 ;
@@ -90,6 +103,7 @@ public void writeToParcel(Parcel dest, int flags) {
90103 dest .writeInt (this .backgroundImageRes );
91104 dest .writeInt (this .titleTextRes );
92105 dest .writeInt (this .subTitleTextRes );
106+ dest .writeInt (this .isGif ? 1 :0 );
93107 }
94108
95109 protected TutorialItem (Parcel in ) {
@@ -100,6 +114,7 @@ protected TutorialItem(Parcel in) {
100114 this .backgroundImageRes = in .readInt ();
101115 this .titleTextRes = in .readInt ();
102116 this .subTitleTextRes = in .readInt ();
117+ this .isGif = in .readInt () == 1 ;
103118 }
104119
105120 public static final Parcelable .Creator <TutorialItem > CREATOR = new Parcelable .Creator <TutorialItem >() {
0 commit comments