Code example for Fragment

Methods: getActivity, getArguments, onCreate

0
    private ContactDetails details;
 
    /** @see android.support.v4.app.Fragment#onCreate(android.os.Bundle) */ 
    @Override 
    public void onCreate(Bundle state) {
        super.onCreate(state);
 
        if (null == state) { state = getArguments(); }
 
        details = new ContactDetails(state);
 
        details.createLoaders(getActivity());
    } 
 
    /** @see android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) */ 
    @Override 
    public View onCreateView(
        LayoutInflater inflater,
        ViewGroup container,
        Bundle b)
    {