Code example for Fragment

Methods: setArguments

0
     * @param init 
     * @return a new ContactDetailFragment 
     */ 
    public static final ContactDetailFragment newInstance(Bundle init) {
        ContactDetailFragment frag = new ContactDetailFragment();
        frag.setArguments(init);
        return frag;
    } 
 
 
    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);