Skip to content

Instantly share code, notes, and snippets.

@mistarA
Created August 3, 2019 07:23
Show Gist options
  • Save mistarA/8b3d05397d2d1353e7b53878749c2d7f to your computer and use it in GitHub Desktop.
Save mistarA/8b3d05397d2d1353e7b53878749c2d7f to your computer and use it in GitHub Desktop.
package com.example.customviewhandson.customviews;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
import com.example.customviewhandson.R;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
public class CircleView extends View {
Paint paintObject;
int viewHeight;
int viewWidth;
public CircleView(Context context) {
super(context);
init();
}
public CircleView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init();
}
private void init() {
paintObject = new Paint();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment