ListUserPostsFragment¶
-
public class
ListUserPostsFragment
extends Fragment implements RVAdapter.OnItemClickListener¶ Creates screen that displays the
Post
s aorg.codethechange.culturemesh.models.User
has made.
Fields¶
rv¶
-
RecyclerView
rv
¶ Scrollable list of
Post
s
Methods¶
newInstance¶
-
public static ListUserPostsFragment
newInstance
(long selUser)¶ Returns a new instance of this fragment for the given section number.
onCreateView¶
-
public View
onCreateView
(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)¶ Create the user interface. Also populate the list of
Post
s with the result fromAPI.Get.userPosts(RequestQueue,long,Response.Listener)
Parameters: - inflater – Inflates the user interface from
R.layout.rv_container
with the providedcontainer
as the parent. - container – Parent used by
inflater
- savedInstanceState – Not used
Returns: The inflated user interface
- inflater – Inflates the user interface from
onItemClick¶
-
public void
onItemClick
(FeedItem item)¶ When the user clicks on an item, redirect them to
SpecificPostActivity
where more details, including comments, are displayed.Parameters: - item – The clicked item.