根据API文档,setBackgroundResource需要一个int值。
如果确实需要位图,则可以使用setBackgroundDrawable代替,并将位图包装在BitmapDrawable中。例
textureView.setBackground(new BitmapDrawable(getResources(), bitmap));

根据API文档,setBackgroundResource需要一个int值。
如果确实需要位图,则可以使用setBackgroundDrawable代替,并将位图包装在BitmapDrawable中。例
textureView.setBackground(new BitmapDrawable(getResources(), bitmap));