package jp.fkmsoft.fragmentlesson.page.title;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import butterknife.ButterKnife;
import butterknife.OnClick;
import jp.fkmsoft.fragmentlesson.R;

/**
 * タイトル画面
 */
public class TitleFragment extends Fragment {
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.fragment_title, container, false);
        ButterKnife.inject(this, root);
        return root;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.reset(this);
    }

    @OnClick(R.id.button_start)
    void startClicked() {
        // Lesson 2の回答
        Toast.makeText(getActivity(), "スタート", Toast.LENGTH_SHORT).show();

        FragmentManager manager = getFragmentManager();
        // Lesson 3.
        // ここにFragmentのreplaceを行う処理を書いてみよう
    }


}

@@ -193,24 +193,75 @@
 entManager;%0A
+import android.support.v4.app.FragmentTransaction;%0A
 import andro
@@ -466,16 +466,73 @@
 esson.R;
+%0Aimport jp.fkmsoft.fragmentlesson.page.main.MainFragment;
 %0A%0A/**%0A *
@@ -1075,9 +1075,10 @@
 son 
-2
+3 
 %E3%81%AE%E5%9B%9E%E7%AD%94%0A
@@ -1089,75 +1089,56 @@
     
-Toast.makeText(getActivity(), %22%E3%82%B9%E3%82%BF%E3%83%BC%E3%83%88%22, Toast.LENGTH_SHORT).show
+FragmentManager manager = getFragmentManager
 ();%0A
-%0A
     
@@ -1153,111 +1153,199 @@
 ment
-Manager manager = getFragmentManager();%0A        // Lesson 3.%0A        // %E3%81%93%E3%81%93%E3%81%ABFragment%E3%81%AEreplace%E3%82%92%E8%A1%8C%E3%81%86%E5%87%A6%E7%90%86%E3%82%92%E6%9B%B8%E3%81%84%E3%81%A6%E3%81%BF%E3%82%88%E3%81%86
+Transaction transaction = manager.beginTransaction();%0A        transaction.addToBackStack(%22tag%22);%0A        transaction.replace(R.id.container, new MainFragment());%0A        transaction.commit();
 %0A   

Add Lesson 3 answer