diff --git a/app/src/main/java/org/ntlab/acanthus_client/views/paint/PaintActivity.java b/app/src/main/java/org/ntlab/acanthus_client/views/paint/PaintActivity.java index 6cab191..83065ac 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/views/paint/PaintActivity.java +++ b/app/src/main/java/org/ntlab/acanthus_client/views/paint/PaintActivity.java @@ -6,6 +6,7 @@ import android.content.Intent; import android.os.Bundle; +import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.widget.Button; @@ -15,6 +16,10 @@ import org.ntlab.acanthus_client.Acanthus; import org.ntlab.acanthus_client.R; import org.ntlab.acanthus_client.databinding.ActivityPaintBinding; +import org.ntlab.acanthus_client.entities.Position; +import org.ntlab.acanthus_client.entities.Stroke; + +import java.util.Collection; //----------------------------------------------------------------- // 描画ページ @@ -127,6 +132,28 @@ binding.buttonAddPage.setText(String.valueOf(i)); } }); + paintViewModel.getStroke().observe(this, new Observer>() { + @Override + public void onChanged(Collection strokes) { + paintCanvas.getCanvas(); + } + }); +//1時的コメントアウトここから + // paintViewModel.getmStrokeNo().observe(this, new Observer() { +// @Override +// public void onChanged(Integer integer) { +// paintViewModel.getPosition(integer); +// } +// }); +// paintViewModel.getMlatestPosition().observe(this, new Observer>() { +// @Override +// public void onChanged(Collection positions) { +// if(positions.size()!=1){ +// //paintCanvas.latestPositionWrite(positions); +// } +// } +// }); +//ここまで } //------------------------------------------------------------------