내가 생각할 수있는 유일한 솔루션은 onDraw는 당신이 실제 하나에 해당 한 다음 전화 번호를 그릴 변수 캔버스,
paint.setColor(Color.BLACK);
canvas.drawText(strValue, x, y, paint);
다음 그릴이 빨간색 사각형
에 첫 번째입니다
canvas.drawRect(myRect, redPaint);
는 당신은 매우 당신의 온 드라 외부 끝나는
canvas.drawline(mStartX,mStartY, mFinishX, mFinishY, myLinePaint);
및 귀하의 라인을 그릴
public void myMethod(){
Paint paint = new Paint();
paint.setColor(Color.BLACK);
this.canvas.drawText(strValue, x, y, paint);
//here you will define the area that you will mark as dirty
//(wich can have the same values as your red Rect)
Rect myRect = new Rect();
myRect.set(x0,y0,x1,y1);
//and finally here you invalidate ONLY the red area
this.canvas.invalidate(myRect);
}
참고 :,이 같은 방법 호출 승이가 그 필요합니다 당신의 onDraw 전역 캔버스 null이 아님을 확인하고 만약 그렇다면, 당신은 실제에 글로벌 같습니다. 이것이 실제로 작동하는지 잘 모르겠지만 그렇게 생각할 수있는 유일한 해결책입니다.
처럼 내가 아는 한에는 당신의 빨간 RECT와 contrastant 수의 색상을 사용하여 당신이 절반 번호로 스타일을 적용 할 수 없기 때문에, 나는 당신을 제안 할 것을 수행하는 방법, 당신의 파란색 원과도 없다 당신의 화포의 baground 색깔. – Raykud