mini-cards/app/src/main/java/com/codigoparallevar/minicards/DrawView.java

24 lines
536 B
Java
Raw Normal View History

2017-07-03 18:43:22 +00:00
package com.codigoparallevar.minicards;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;
class DrawView extends View {
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
public DrawView(Context context) {
super(context);
paint.setColor(Color.RED);
}
@Override
public void onDraw(Canvas canvas){
canvas.drawLine(0, 0, 20, 20, paint);
canvas.drawLine(20, 0, 0, 20, paint);
}
}