public class AppboyFeedFragment
extends ListFragment
Modifier and Type | Class and Description |
---|---|
class |
AppboyFeedFragment.FeedGestureListener
This class is a custom listener to catch gestures happening outside the bounds of the listview that
should be fed into it.
|
Constructor and Description |
---|
AppboyFeedFragment() |
Modifier and Type | Method and Description |
---|---|
java.util.EnumSet<CardCategory> |
getCategories() |
boolean |
getSortEnabled() |
void |
onActivityCreated(android.os.Bundle savedInstanceState) |
void |
onAttach(android.content.Context context) |
android.view.View |
onCreateView(android.view.LayoutInflater layoutInflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroyView() |
void |
onDetach() |
void |
onPause() |
void |
onRefresh()
Called when the user swipes down and requests a feed refresh.
|
void |
onResume() |
void |
onSaveInstanceState(android.os.Bundle outState)
The onSaveInstanceState method gets called before an orientation change when either the fragment is
the current fragment or exists in the fragment manager backstack.
|
void |
setCategories(java.util.EnumSet<CardCategory> categories)
Calling this method will make AppboyFeedFragment display a list of cards where each card belongs
to at least one of the given categories.
|
void |
setCategory(CardCategory category) |
void |
setSortEnabled(boolean sortEnabled)
The setSortEnabled methods sets the mSortEnabled bool which determines whether or not on update we sort
newsfeed cards by their read status.
|
java.util.List<Card> |
sortFeedCards(java.util.List<Card> cards)
The sortFeedCards is responsible for sorting newsfeed cards depending on whether or not they have already been viewed.
|
public void onAttach(android.content.Context context)
public android.view.View onCreateView(android.view.LayoutInflater layoutInflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
public void onActivityCreated(android.os.Bundle savedInstanceState)
public java.util.List<Card> sortFeedCards(java.util.List<Card> cards)
public void onResume()
public void onDestroyView()
public void onPause()
public void onDetach()
public void onSaveInstanceState(android.os.Bundle outState)
public java.util.EnumSet<CardCategory> getCategories()
public boolean getSortEnabled()
public void setSortEnabled(boolean sortEnabled)
public void setCategory(CardCategory category)
public void setCategories(java.util.EnumSet<CardCategory> categories)
categories
- an EnumSet of CardCategory. Please pass in a non-empty EnumSet of CardCategory,
or a null. An empty EnumSet is considered invalid.public void onRefresh()