Back to project page RockAndDeal.
The source code is released under:
Apache License
If you think the Android project RockAndDeal 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 com.rockanddeal.rockanddeal.fragment; /*from w ww. j a v a 2 s . com*/ import android.app.Activity; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.rockanddeal.rockanddeal.R; import com.rockanddeal.rockanddeal.activity.NavigationDrawerActivity; /** * Created by gregoire on 9/21/14. */ public class CategoriesFragment extends Fragment { /** * The fragment argument representing the section number for this * fragment. */ private static final String ARG_SECTION_NUMBER = "section_number"; /** * Returns a new instance of this fragment for the given section * number. */ public static CategoriesFragment newInstance(int sectionNumber) { CategoriesFragment fragment = new CategoriesFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } public CategoriesFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_categories, container, false); return rootView; } @Override public void onAttach(Activity activity) { super.onAttach(activity); ((NavigationDrawerActivity) activity).onSectionAttached( getArguments().getInt(ARG_SECTION_NUMBER)); } }