diff --git a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java index c1cf82d..faeaa29 100644 --- a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java +++ b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java @@ -17,17 +17,19 @@ private DrawingCanvas drawingCanvas; private DrawingStateViewModel drawingStateViewModel; + private String rid; + private Integer nowDno; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_drawing); - // drawingCanvas = (DrawingCanvas) findViewById(R.id.canvas); + //drawingCanvas = (DrawingCanvas) findViewById(R.id.canvas); //Irisから必要な情報を取得 Iris iris = (Iris) this.getApplication(); - String rid = iris.getRid(); + rid = iris.getRid(); String nickName = iris.getNickname(); drawingStateViewModel= new ViewModelProvider(this).get(DrawingStateViewModel.class); @@ -46,7 +48,8 @@ @Override public void onChanged(Integer dno) { //String keyword = keywords.get(dno); - //textKeyword.setText(keyword); + nowDno = dno; + textKeyword.setText(dno); } }); @@ -58,6 +61,7 @@ Intent intent = new Intent(DrawingActivity.this, GameMemberActivity.class); startActivity(intent); } + }); //タイマースタート呼び出し drawingStateViewModel.start(500); @@ -66,7 +70,8 @@ @Override public void onClick(View v){ if(v.getId() == R.id.okButtton) {//okButtonが押されたときの処理 - drawingStateViewModel.putDrawing(); + String drawingStr = "test"; + drawingStateViewModel.putDrawing(rid, nowDno, drawingStr); }else if(v.getId() == R.id.clearButton){//clearButtonが押されたときの処理 drawingCanvas.clearCanvas(); }