@Override public void onClick(View v) { scannerBarView.start(); } });
@Override public void onClick(View v) { scannerBarView.setScannerBarImageResource(R.drawable.camera_mask_scanner_line); } });
private void executeRequestLayout() { boolean needRestart = isRunning(); stop(); requestLayout(); if (needRestart) start(); }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { measureChildren(widthMeasureSpec, heightMeasureSpec); reLocationScannerBarView(cameraLensView.getCameraLensRect()); super.onMeasure(widthMeasureSpec, heightMeasureSpec); }
@Override public void onClick(View v) { scannerBarView.pause(); } });
@Override public void onClick(View v) { scannerBarView.stop(); } });
@Override public void onClick(View v) { scannerBarView.resume(); } });
public void setText(String text) { this.text = text; textStaticLayout = null; executeInvalidateDelay(); }
@Override public void onCheckedChanged(RadioGroup group, int checkedId) { switch (checkedId) { case R.id.radio_location_below: cameraLensView.setTextLocation(CameraLensView.BELOW_CAMERA_LENS); break; case R.id.radio_location_above: cameraLensView.setTextLocation(CameraLensView.ABOVE_CAMERA_LENS); break; } } });
@Override public void onCheckedChanged(RadioGroup group, int checkedId) { switch (checkedId) { case R.id.radio_shape_circle: cameraLensView.setCameraLensShape(CameraLensView.CIRCULAR); break; case R.id.radio_shape_square: cameraLensView.setCameraLensShape(CameraLensView.RECTANGLE); break; } } });
@Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { cameraLensView.setCameraLensTopMargin(progress); }
@Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { cameraLensView.setTextVerticalMargin(progress); }
public void setBoxBorderWidth(int boxBorderWidth) { this.boxBorderWidth = boxBorderWidth; executeInvalidateDelay(); }
public void setTextLocation(@TextLocation int textLocation) { this.textLocation = textLocation; executeInvalidateDelay(); }
public void setTextRightMargin(int textRightMargin) { this.textRightMargin = textRightMargin; executeInvalidateDelay(); }
public void setTextMathParent(boolean textMathParent) { this.textMathParent = textMathParent; executeInvalidateDelay(); }
public void setCameraLensShape(@CameraLensShape int cameraLensShape) { this.cameraLensShape = cameraLensShape; executeInvalidateDelay(); }