| | package org.ntlab.radishforandroidstudio.cactusClient.views; |
---|
| | |
---|
| | |
---|
| | import android.accounts.Account; |
---|
| | import android.os.Bundle; |
---|
| | import android.support.v4.app.Fragment; |
---|
| | 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 android.widget.EditText; |
---|
| | import android.widget.Toast; |
---|
| | |
---|
| | |
---|
| | |
---|
| | import org.ntlab.radishforandroidstudio.R; |
---|
| | |
---|
| |
---|
| | public View onCreateView(LayoutInflater inflater, ViewGroup container, |
---|
| | Bundle savedInstanceState) { |
---|
| | // Inflate the layout for this fragment |
---|
| | return inflater.inflate(R.layout.instances_fragment, container, false); |
---|
| | } |
---|
| | |
---|
| | public void onStart() { |
---|
| | super.onStart(); |
---|
| | |
---|
| | Button button = (Button) getActivity().findViewById(R.id.Instance1); |
---|
| | //↓↓↓↓↓↓↓↓画面遷移↓↓↓↓↓↓↓↓ |
---|
| | 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 CharactersFragment()); |
---|
| | |
---|
| | transaction.commit(); |
---|
| | } |
---|
| | }); |
---|
| | } |
---|
| | } |
---|
| | |
---|
| | |
よろしく
instances画面、characters画面への遷移、移動
a6a9682
intomaster
fromTest
on 14 Jun 2018