Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change doc for SectionedCardList #431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/CARDLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,10 @@ You can use it with our CardArrayAdapter without changing your code:
CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(),cards);

// Define your sections
List<GplayCardSection> sections = new ArrayList<GplayCardSection>();
List<CardSection> sections = new ArrayList<CardSection>();
sections.add(new CardSection(1,"Section 1"));
sections.add(new CardSection(3,"Section 2"));
GplayCardSection[] dummy = new GplayCardSection[sections.size()];
CardSection[] dummy = new CardSection[sections.size()];

//Define your Sectioned adapter
SectionedCardAdapter mAdapter = new SectionedCardAdapter(getActivity(), mCardArrayAdapter);
Expand Down Expand Up @@ -783,7 +783,7 @@ It is very easy o obtain it you have to extend the SectionedCardAdapter:
//Override this method to customize your section's view

//Get the section
MyCardSection section = (MyCardSection) getCardSections().get(position);
CardSection section = (CardSection) getCardSections().get(position);

if (section != null ) {
//Set the title
Expand All @@ -809,11 +809,11 @@ And then use it with the same code described above.
CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(),cards);

// Define your sections
List<MyCardSection> sections = new ArrayList<MyCardSection>();
sections.add(new MyCardSection(1,"Section 1","More"));
sections.add(new MyCardSection(3,"Section 2","Other"));
List<CardSection> sections = new ArrayList<CardSection>();
sections.add(new CardSection(1,"Section 1","More"));
sections.add(new CardSection(3,"Section 2","Other"));

MyCardSection[] dummy = new MyCardSection[sections.size()];
CardSection[] dummy = new CardSection[sections.size()];

//Define your Sectioned adapter
MySectionedAdapter mAdapter = new MySectionedAdapter(getActivity(), mCardArrayAdapter);
Expand Down