diff --git a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java index febdbf1..d255f4a 100644 --- a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java +++ b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java @@ -10,6 +10,7 @@ import android.os.Bundle; import android.view.View; import android.widget.CompoundButton; +import android.widget.SeekBar; import android.widget.TextView; import android.widget.ToggleButton; @@ -71,10 +72,28 @@ } }); + //筆の大きさを変えるシークバー + SeekBar seekbar = findViewById(R.id.seekBar); + seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { + @Override + public void onProgressChanged(SeekBar seekBar, int i, boolean b) {//変更中 + drawingCanvas.setPenWidth(i); + } + + @Override + public void onStartTrackingTouch(SeekBar seekBar) {//変更開始時 + } + + @Override + public void onStopTrackingTouch(SeekBar seekBar) {//変更終了時 + } + }); + TextView textKeyword =(TextView)findViewById(R.id.keywordText);//keywordのTextView TextView textMemberNum = (TextView)findViewById(R.id.drawingNowText);//残りのイラスト枚数のTextView TextView timerText = (TextView)findViewById(R.id.timerText);//TimerのTextView + drawingCanvas = (DrawingCanvas) findViewById(R.id.drawingCanvas); //残りのイラスト枚数の表示 @@ -119,7 +138,7 @@ } }); - //getTimier + //getTimer drawingStateViewModel.getTimer().observe(this, new Observer(){ @Override public void onChanged(Integer time) {