2010-02-09 18 views

回答

0

您可以創建類擴展視圖,並覆蓋onDraw和onTouchEvent方法。

0
Paint paint = new Paint(); 
paint.setStyle(Paint.Style.FILL); 
paint.setColor(Color.MAGENTA); 
DashPathEffect dashPath =new DashPathEffect(new float[ ]{70,2}, 30); 
paint.setPathEffect(dashPath); 
paint.setStrokeWidth(80); 
canvas.drawLine(30, 300 , 320, 300, paint); 
相關問題