SurfaceView srf; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Init(); srf = (SurfaceView)findViewById(R.id.surfaceView1); Canvas cv = new Canvas(); Paint pn = new Paint(); pn.setAntiAlias(true); pn.setStrokeWidth(6f); pn.setColor(Color.BLUE); pn.setStyle(Paint.Style.STROKE); pn.setStrokeJoin(Paint.Join.ROUND); cv.drawLine(2, 2, 100, 100,pn); srf.draw(cv); }
draw
SurfaceView
Canvas
Activity
onCreate
onDraw
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)