ListUserPostsFragment¶
-
public class
ListUserPostsFragmentextends Fragment implements RVAdapter.OnItemClickListener¶ Creates screen that displays the
Posts aorg.codethechange.culturemesh.models.Userhas made.
Fields¶
rv¶
-
RecyclerView
rv¶ Scrollable list of
Posts
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
Posts with the result fromAPI.Get.userPosts(RequestQueue,long,Response.Listener)Parameters: - inflater – Inflates the user interface from
R.layout.rv_containerwith the providedcontaineras 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
SpecificPostActivitywhere more details, including comments, are displayed.Parameters: - item – The clicked item.