I have a text-view and a bitmap. Now, I want to draw this bitmap on the canvas of the text-view. Is there any way I can obtain the canvas of the text-view, to draw the bitmap onto it ?
I know, I can achieve similar results by wrapping the bitmap into a bitmapdrawable, & setting the background of the text-view to this bitmapdrawable like this: textView.setBackground(new BitmapDrawable(getResources(), bitmap)); This operation needs to take place while UI interaction, so I do not want to do this way, as it requires creation of a bitmapdrawable object every time, & android does not recommend creating objects during UI interaction.
Can anybody suggest some other way to achieve similar results, which has least overhead. Or is there anyway I can get the canvas of the textview object I am working on & directly draw the bitmap onto it ?
If anybody has worked in this area before, please help !