Good day. I can not call DialogFragment from canvas . I draw 4 points on the canvas, then I find them, but how, when pressed, can I call a DialogFragment to sign this point, for example !? As it does not work, I need help .... Code:
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawPath(path, paint); canvas.drawPath(mpath, mpaint); } @Override public boolean onTouchEvent(MotionEvent event) { float x=event.getX(); float y=event.getY(); switch (event.getAction()){ case MotionEvent.ACTION_DOWN: if (i<4) { path.addCircle(x, y, 30, Path.Direction.CW); point = new Point(x, y); obgect.add(point); poin=false; } else { for (Point o:obgect) { if (x >= ox - 30 && x <= ox + 30 && y >= oy - 30 && y <= oy + 30) { mpath.addCircle(ox, oy, 30, Path.Direction.CW); } } } } i++; invalidate(); return super.onTouchEvent(event); }
DialogFragment. I see that you never tried to call him anywhere. Explain where you need it and why. - Vladyslav Matviienko