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; /* w w w .j a 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.SubscribedGroupsAdapter; import org.iiitb.se.links.utils.AppConstants; import org.iiitb.se.links.utils.network.groups.subscribed.SubscribedGroupsLoader; 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 SubscribedGroupFragment extends Fragment { private static final String TAG = "SubscribedGroupFragment"; private SubscribedGroupsLoader subscribedGroupsLoader; private SubscribedGroupsAdapter 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 SubscribedGroupsAdapter(getActivity(), groups); mListView.setAdapter(groupsAdapter); subscribedGroupsLoader = new SubscribedGroupsLoader(getActivity(), groupsAdapter, groups); subscribedGroupsLoader.authorizeOrLoadGroups(); return rootView; } }