diff --git a/app/src/main/java/io/github/lewismcgeary/androidgameoflife/CustomAppIntroFragment.java b/app/src/main/java/io/github/lewismcgeary/androidgameoflife/CustomRulesPageFragment.java similarity index 84% rename from app/src/main/java/io/github/lewismcgeary/androidgameoflife/CustomAppIntroFragment.java rename to app/src/main/java/io/github/lewismcgeary/androidgameoflife/CustomRulesPageFragment.java index 6a82382..11550fb 100644 --- a/app/src/main/java/io/github/lewismcgeary/androidgameoflife/CustomAppIntroFragment.java +++ b/app/src/main/java/io/github/lewismcgeary/androidgameoflife/CustomRulesPageFragment.java @@ -15,7 +15,7 @@ import android.widget.LinearLayout; import android.widget.TextView; -public class CustomAppIntroFragment extends Fragment { +public class CustomRulesPageFragment extends Fragment { private static final String ARG_TITLE = "title"; private static final String ARG_DESC = "desc"; @@ -24,13 +24,13 @@ public class CustomAppIntroFragment extends Fragment { private static final String ARG_TITLE_COLOR = "title_color"; private static final String ARG_DESC_COLOR = "desc_color"; - public static CustomAppIntroFragment newInstance(CharSequence title, CharSequence description, int imageDrawable, int bgColor) { + public static CustomRulesPageFragment newInstance(CharSequence title, CharSequence description, int imageDrawable, int bgColor) { return newInstance(title, description, imageDrawable, bgColor, 0, 0); } - public static CustomAppIntroFragment newInstance(CharSequence title, CharSequence description, int imageDrawable, int bgColor, int titleColor, int descColor) { - CustomAppIntroFragment sampleSlide = new CustomAppIntroFragment(); + public static CustomRulesPageFragment newInstance(CharSequence title, CharSequence description, int imageDrawable, int bgColor, int titleColor, int descColor) { + CustomRulesPageFragment sampleSlide = new CustomRulesPageFragment(); Bundle args = new Bundle(); args.putCharSequence(ARG_TITLE, title); @@ -47,7 +47,7 @@ public static CustomAppIntroFragment newInstance(CharSequence title, CharSequenc private int drawable, bgColor, titleColor, descColor; private CharSequence title, description; - public CustomAppIntroFragment() { + public CustomRulesPageFragment() { } @Override @@ -67,7 +67,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) { @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - View v = inflater.inflate(R.layout.fragment_intro_custom, container, false); + View v = inflater.inflate(R.layout.fragment_rules_custom, container, false); TextView t = (TextView) v.findViewById(R.id.title); TextView d = (TextView) v.findViewById(R.id.description); ImageView i = (ImageView) v.findViewById(R.id.image); diff --git a/app/src/main/java/io/github/lewismcgeary/androidgameoflife/ExplainRulesActivity.java b/app/src/main/java/io/github/lewismcgeary/androidgameoflife/ExplainRulesActivity.java index 244de86..2dab04a 100644 --- a/app/src/main/java/io/github/lewismcgeary/androidgameoflife/ExplainRulesActivity.java +++ b/app/src/main/java/io/github/lewismcgeary/androidgameoflife/ExplainRulesActivity.java @@ -15,7 +15,7 @@ public class ExplainRulesActivity extends AppIntro2 { @Override public void init(@Nullable Bundle savedInstanceState) { - CustomAppIntroFragment summaryFragment = CustomAppIntroFragment.newInstance(getString(R.string.rules_summary_title), getString(R.string.rules_summary_text), R.drawable.life_logo_no_shadow_368, ContextCompat.getColor(getApplicationContext(), R.color.rulesViewPagerBackground)); + CustomRulesPageFragment summaryFragment = CustomRulesPageFragment.newInstance(getString(R.string.rules_summary_title), getString(R.string.rules_summary_text), R.drawable.life_logo_no_shadow_368, ContextCompat.getColor(getApplicationContext(), R.color.rulesViewPagerBackground)); addSlide(summaryFragment); addSlide(AppIntroFragment.newInstance(getString(R.string.rules_fewer_than_two_title), getString(R.string.rules_fewer_than_two_text), R.drawable.rules_fewer_than_two_neighbours, ContextCompat.getColor(getApplicationContext(), R.color.rulesViewPagerBackground))); addSlide(AppIntroFragment.newInstance(getString(R.string.rules_two_or_three_title), getString(R.string.rules_two_or_three_text), R.drawable.rules_two_or_three_neighbours, ContextCompat.getColor(getApplicationContext(), R.color.rulesViewPagerBackground))); diff --git a/app/src/main/res/layout/fragment_intro_custom.xml b/app/src/main/res/layout/fragment_rules_custom.xml similarity index 100% rename from app/src/main/res/layout/fragment_intro_custom.xml rename to app/src/main/res/layout/fragment_rules_custom.xml