How to draw filled triangle on android Canvas
I have class MyView that extends View class. MyView should draw filled triangle. I drew a triangle but I cannot get it filled. This is my onDraw() method: @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); paint.setColor(android.graphics.Color.BLACK); canvas.drawPaint(paint); paint.setStrokeWidth(4); paint.setColor(android.graphics.Color.RED); paint.setStyle(Paint.Style.FILL_AND_STROKE); paint.setAntiAlias(true); Point a = new Point(0, 0); Point b = new Point(0, 100); Point c = new Point(87, 50); Path path = new Path(); path.setFillType(FillType