diff --git a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/CharactersFragment.java b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/CharactersFragment.java new file mode 100644 index 0000000..100114b --- /dev/null +++ b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/CharactersFragment.java @@ -0,0 +1,37 @@ +package org.ntlab.radishforandroidstudio.cactusClient.views; + +import android.os.Bundle; +import android.support.v4.app.FragmentManager; +import android.support.v4.app.FragmentTransaction; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.support.v4.app.Fragment; +import android.widget.Button; + + +import org.ntlab.radishforandroidstudio.R; + +public class CharactersFragment extends Fragment { + + public void onStart() { + super.onStart(); + + Button button = (Button) getActivity().findViewById(R.id.chooseInstances); + //↓↓↓↓↓↓↓↓画面遷移↓↓↓↓↓↓↓↓ + button.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View v) { + //Toast.makeText(getActivity(), "hoge!", Toast.LENGTH_SHORT).show(); + + FragmentManager manager = getFragmentManager(); + FragmentTransaction transaction = manager.beginTransaction(); + + transaction.replace(R.id.fragment_place, new InstancesFragment()); + + transaction.commit(); + } + }); + } +} \ No newline at end of file