I am trying to draw many edittext on canvas every time when the user draw a rectangle using the ondraw on the canvas. Is this even possible? without having to add the edittext on the xml file? and also i an trying to do this in a java file instead of the activity. Please advice thank you.

Current draw rectangle codes are as follows:

 for (RectF rec : rects) {

    if (rec.height() != 50 ) {
        canvas.drawOval(rec, paintColor);

    } else {
        canvas.drawRect(rec, paintColor);

    }

没有正确的解决方案

其他提示

If you are trying to draw text on your canvas, you can call:

canvas.drawText()
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top