Back to project page links.
The source code is released under:
MIT License
If you think the Android project links listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.iiitb.se.links.home.fragments; //from w w w. ja v a 2 s. co m import java.util.ArrayList; import java.util.List; import org.iiitb.se.links.R; import org.iiitb.se.links.home.fragments.adapter.RequestsGroupsAdapter; import org.iiitb.se.links.utils.AppConstants; import org.iiitb.se.links.utils.network.groups.requests.RequestsGroupsLoader; import org.json.JSONObject; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; public class RequestsGroupFragment extends Fragment { private static final String TAG = "RequestsGroupFragment"; private RequestsGroupsLoader requestsGroupsLoader; private RequestsGroupsAdapter groupsAdapter; private List<JSONObject> groups = new ArrayList<JSONObject>(); private ListView mListView; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater .inflate(R.layout.fragment_groups, container, false); int i = getArguments().getInt(AppConstants.LINK_FRAGMENT_OPTION_NUMBER); String linkOption = getResources().getStringArray(R.array.links_options)[i]; getActivity().setTitle(linkOption); mListView = (ListView) rootView .findViewById(R.id.groups_card_listview); groupsAdapter = new RequestsGroupsAdapter(getActivity(), groups); mListView.setAdapter(groupsAdapter); requestsGroupsLoader = new RequestsGroupsLoader(getActivity(), groupsAdapter, groups); requestsGroupsLoader.authorizeOrLoadGroups(); return rootView; } }