on-internet
← Community

How to use addView in ViewGroup?

Stack Overflow ·

I wanted to use a ViewGroup class and add views into it. So how can we accomplish this?? Something like this :: public class DrawView extends View { private static final String TAG = "DrawView"; List<Point> points = new ArrayList<Point>(); Paint paint = new Paint(); public DrawView(Context context) { //2 super(context); System.out.println("drawwwwwwwwwwwwwwwwwwwwwconnnnnnnnnnnnn"); setFocusable(true); setFocusableInTouchMode(true); paint.setColor(Color.MAGENTA); paint.setAntiAlias(true); } @Override public void onDraw(Canvas canvas) { System.out.println("drawwwwwwwwwwwwwwwwwwwww"); for (Point

Comments

Sign in or sign up to comment and upvote.

No comments yet.