diff --git a/app/src/main/java/org/ntlab/irisclient/DrawingCardFragment.java b/app/src/main/java/org/ntlab/irisclient/DrawingCardFragment.java index c771f8f..bb920ff 100644 --- a/app/src/main/java/org/ntlab/irisclient/DrawingCardFragment.java +++ b/app/src/main/java/org/ntlab/irisclient/DrawingCardFragment.java @@ -40,6 +40,7 @@ import java.util.Map; import java.util.concurrent.Executors; + public class DrawingCardFragment extends Fragment { private ImageButton[] imageButtons; @@ -71,7 +72,13 @@ Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); - gameViewModel = new ViewModelProvider(this).get(GameViewModel.class); + Iris iris = (Iris) this.getActivity().getApplication(); + rid = iris.getRid(); + gameViewModel.start(500, iris); + gameViewModel = new ViewModelProvider(this).get(GameViewModel.class); + gameViewModel.setRid(rid); + System.out.println(gameViewModel.getImageLiveData()); + resources = getResources(); View view = inflater.inflate(R.layout.fragment_card_drawing, container, false); @@ -114,15 +121,10 @@ (ImageView) view.findViewById(R.id.backColour15) }; - System.out.println("asfsafddf"); - Iris iris = (Iris) this.getActivity().getApplication(); - myTeam = iris.getTeam(); - gameViewModel.start(500, iris); - rid = iris.getRid(); - isMaster = iris.isMaster(); + System.out.println("コンストラクタでのログ確認"); System.out.println("kota: isMasterかどうか:" + isMaster); System.out.println("kota: getrid:" + iris.getRid()); - System.out.println("kota: getgame:" + iris.getTeam()); + System.out.println("kota: getteame:" + iris.getTeam()); System.out.println("kota: getMemberList:" + iris.getMemberList()); System.out.println("kota: getNickName:" + iris.getNickname()); System.out.println("kota: getImageLiveData:" + gameViewModel.getImageLiveData().getValue());