Code example for Fragment

Methods: setArgumentstoString

0
    static SecondFragment newInstance(String url) {
        Log.i(TAG, "SecondFragment Enter newInstance");
        SecondFragment f = new SecondFragment();
        Bundle b = new Bundle();
        b.putString("url", url);
        f.setArguments(b);
        Log.i(TAG, "SecondFragment Exit  newInstance f = " + f.toString());
        return f;
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle savedInstanceState) {
        Log.i(TAG, "SecondFragment Enter onSaveInstanceState");
        super.onSaveInstanceState(savedInstanceState);
        String lasturl = mWebview.getUrl();
        savedInstanceState.putString("url", lasturl);
        Log.i(TAG, "SecondFragment Exit  onSaveInstanceState");
    } 
 
    @Override