Skip to content

Commit

Permalink
rename similarly named fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
lewismcgeary committed Mar 5, 2016
1 parent 85fdd21 commit 8ea905c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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);
Expand All @@ -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
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down

0 comments on commit 8ea905c

Please sign in to comment.