android - Draw with canvas.draw() a custom class -



android - Draw with canvas.draw() a custom class -

im using canvas draw phone call "label" in app. "label" has round shape, icon , text. i'm calling method canvas.draw() , set params draw this. since app needs handle lot of labels, need create class handle icon , text of label instead of calling method canvas.draw(text, bitmap, paint...). there way can that? post of code:

public void ondraw(canvas canvas){ canvas.draw(bitmap mybitmap); canvas.draw(string mytext);

and on. need utilize class param draw canvas.

canvas.draw(mycustomclass labelbathroom);

assuming mycustomclass has properties , methods required.

you wrap in either view or drawable.

android class canvas ondraw

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -