public class PostsFrag
extends Fragment
Modifier and Type | Field and Description |
---|---|
private RVAdapter |
mAdapter |
(package private) java.lang.String |
maxEventId |
(package private) java.lang.String |
maxPostId |
private RecyclerView.LayoutManager |
mLayoutManager |
private RecyclerView |
mRecyclerView |
(package private) android.widget.TextView |
noPosts
The textview that is shown if no feed items have been created for this network.
|
(package private) RequestQueue |
queue |
(package private) long |
selectedNetwork |
(package private) android.content.SharedPreferences |
settings |
Constructor and Description |
---|
PostsFrag() |
Modifier and Type | Method and Description |
---|---|
void |
fetchNewPage(<any> listener)
If the user has exhausted the list of fetched posts/events, this will fetch another batch of
posts.
|
void |
onAttach(android.content.Context context) |
void |
onCreate(android.os.Bundle savedInstanceState)
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
Create user interface and handle clicks on posts by launching
SpecificPostActivity ,
which displays more detailed information. |
void |
onDetach() |
void |
onStop()
This ensures that we are canceling all network requests if the user is leaving this activity.
|
private RecyclerView mRecyclerView
private RVAdapter mAdapter
private RecyclerView.LayoutManager mLayoutManager
long selectedNetwork
android.content.SharedPreferences settings
RequestQueue queue
java.lang.String maxEventId
java.lang.String maxPostId
android.widget.TextView noPosts
public void onCreate(android.os.Bundle savedInstanceState)
savedInstanceState
- public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
SpecificPostActivity
,
which displays more detailed information.inflater
- Inflates R.layout#fragment_posts
into a full user interface that is
a child of container
container
- Parent of created user interfacesavedInstanceState
- Not usedpublic void fetchNewPage(<any> listener)
listener
- the listener that will be called when we finish fetching the stuffs.public void onAttach(android.content.Context context)
context
- public void onDetach()
public void onStop()