java - How do I draw a EditText to canvas in android? -
i draw
edittext username = new edittext(context); to specific spot on canvas in
protected void ondraw(canvas canvas) { } is possible draw on basis of x,y coordinate in java file without using xml layout?
yes can draw edittext on canvas, here hint:
edittext ed; . . . . . ed.setdrawingcacheenabled(true); bitmap b = ed.getdrawingcache(); canvas.drawbitmap(bitmap, l, t, r, b, null); you can create/initialize edittext @ run time this:
edittext edittext = new edittext(this); edittext.settext("my text"); edittext.setwidth(180); edittext.setbackgroundcolor(color.white);
Comments
Post a Comment