Android Open Source - fragment-navigation Template Fragment






From Project

Back to project page fragment-navigation.

License

The source code is released under:

Apache License

If you think the Android project fragment-navigation listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package be.hcpl.android.fragment.navigation.fragments;
/*from ww  w .  j  av a  2s.c  o  m*/
import android.app.Fragment;

import be.hcpl.android.fragment.navigation.R;

/**
 * A template for all fragments, this adds a name for the fragment to be listed in menu
 * <p/>
 * Created by hcpl on 12/05/14.
 */
public class TemplateFragment extends Fragment {

    /**
     * @return the class name of the fragment, this can ben loaded in the drawer without need of a
     * special adapter
     */
    public String toString() {
        return this.getClass().getSimpleName();
    }

    /**
     * retrieve a translated title for this fragment that can be used for display in menu
     *
     * @return
     */
    public int getTitleResourceId() {
        return R.string.empty_menu_item;
    }
}




Java Source Code List

be.hcpl.android.fragment.navigation.MainActivity.java
be.hcpl.android.fragment.navigation.fragments.AboutFragment.java
be.hcpl.android.fragment.navigation.fragments.FirstFragment.java
be.hcpl.android.fragment.navigation.fragments.NavigationDrawerFragment.java
be.hcpl.android.fragment.navigation.fragments.SecondFragment.java
be.hcpl.android.fragment.navigation.fragments.TemplateFragment.java
be.hcpl.android.fragment.navigation.fragments.ThirdFragment.java