Code example for Fragment

Methods: onAttach

     * {@code} 
    public void onAttach(Activity activity) {
        Log.v(TAG, "onAttach");
     * <blockquote> 
     * システムは、 {@link Fragment} を作るときに、onCreate(Bundle) を呼び出します。 
     * このコールバックメソッドでは、{@link Fragment} に必要なコンポーネントの初期化を行います。 
     * </blockquote> 
     * <blockquote> 
     * The system calls this when creating the {@link Fragment}. 
     * Within your implementation, you should initialize essential components of the {@link Fragment} 
     * that you want to retain when the {@link Fragment} is paused or stopped, then resumed. 
     * onCreate(Bundle) called to do initial creation of the {@link Fragment}.