public class CommentsFrag
extends Fragment
Modifier and Type | Field and Description |
---|---|
private RVCommentAdapter |
mAdapter |
private RecyclerView.LayoutManager |
mLayoutManager |
private RecyclerView |
mRecyclerView |
private RequestQueue |
queue
Queue to which asynchronous tasks (mainly network requests) are added
|
(package private) android.content.SharedPreferences |
settings
The app's shared settings that store user info and preferences
|
Constructor and Description |
---|
CommentsFrag() |
Modifier and Type | Method and Description |
---|---|
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)
Populate the activity with UI elements
|
void |
onDetach() |
void |
onStop()
This ensures that we are canceling all network requests if the user is leaving this activity.
|
private RecyclerView mRecyclerView
private RVCommentAdapter mAdapter
private RecyclerView.LayoutManager mLayoutManager
private RequestQueue queue
android.content.SharedPreferences settings
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)
inflater
- Inflates the xml R.layout#fragment_comments
into the displayed UIcontainer
- TODO: What is this?savedInstanceState
- Saved state that can be restored. Not used.inflater
public void onAttach(android.content.Context context)
context
- public void onDetach()
public void onStop()