Code example for Fragment

Methods: onCreate

	private ListView activityList;
	ActivitiesAdapter adapter;
	public void onCreate(Bundle savedInstanceState) {
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		final View v = inflater.inflate(R.layout.fragment_profileactivity, null);
		activityList = (ListView) v.findViewById(;
		if (adapter != null) {
		return v;
	public void setActivitiesAndUser(Context context, final ActivitiesResponse[] activities, UserDetails user ) {
		// Set the activities, create the adapter 
Connect your IDE to all the code out there  Get Codota for Java