Initially, you cannot put editing text or canusig canvas. Instead, you should draw it. So, create your own layout and draw this layout with canvas
Try it, it can help you. in onDraw(..)
LinearLayout lL = new LinearLayout(context); EditText editTextView = new EditText(context); editTextView.setVisibility(View.VISIBLE); lL.addView(editTextView); lL.measure(canvas.getWidth(), canvas.getHeight()); lL.layout(0, 0, canvas.getWidth(), canvas.getHeight());
And take a look at this another example: Click here
This provides another way to add views.
RajeshVijayakumar
source share