I have a bitmap in memory at run-time. I want to set the background of a text view to this bitmap. I am not able to find any standard procedure for that (not a hacky one). I
According to the API docs, setBackgroundResource expects an int.
If you definitely need a bitmap, you can use setBackgroundDrawable instead and wrap your bitmap in a BitmapDrawable. example
textureView.setBackground(new BitmapDrawable(getResources(), bitmap));