diff --git a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java index f7af557..a4010c5 100644 --- a/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java +++ b/app/src/main/java/org/ntlab/irisclient/DrawingActivity.java @@ -9,6 +9,7 @@ import android.graphics.Color; import android.os.Bundle; import android.view.View; +import android.view.WindowManager; import android.widget.CompoundButton; import android.widget.SeekBar; import android.widget.TextView; @@ -35,6 +36,8 @@ super.onCreate(savedInstanceState); setContentView(R.layout.activity_drawing); + //getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);//ステータスバー非表示 + //Irisから必要な情報を取得 Iris iris = (Iris) this.getApplication(); Boolean bMaster = iris.isMaster(); @@ -72,12 +75,35 @@ } }); + TextView textPenSize =(TextView)findViewById(R.id.penSizeText); + TextView textAlpha =(TextView)findViewById(R.id.alphaText); + textPenSize.setText("サイズ: 10%"); + textAlpha.setText("透明度: 255%"); //筆の大きさを変えるシークバー SeekBar seekbar = findViewById(R.id.seekBar); seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int i, boolean b) {//変更中 drawingCanvas.setPenWidth(i); + textPenSize.setText("サイズ: "+ i + "%"); + } + + @Override + public void onStartTrackingTouch(SeekBar seekBar) {//変更開始時 + } + + @Override + public void onStopTrackingTouch(SeekBar seekBar) {//変更終了時 + } + }); + + //筆の透明度を変えるシークバー + SeekBar seekbar2 = findViewById(R.id.seekBar2); + seekbar2.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { + @Override + public void onProgressChanged(SeekBar seekBar, int i, boolean b) {//変更中 + drawingCanvas.setAlpha(i); + textAlpha.setText("透明度: "+ i + "%"); } @Override @@ -114,7 +140,7 @@ @Override public void onChanged(Integer dno) { String keyword = keywordList.get(dno); - textKeyword.setText("Dno: " + dno + ", Keyword: " + keyword); + textKeyword.setText(keyword); drawingNow++; textMemberNum.setText(""+drawingNow+"/"+drawingNum); drawingCanvas.clearCanvas();