I am trying to implement the example shown on this page. I have tried on three different devices running android 4 and above, and in all cases I get a black screen with this warning:
01-27 20:01:22.683: W/TextureView(4728): A TextureView or a subclass can only be used with hardware acceleration enabled.
I have turned on hardware acceleration in the application manifest:
<application
android:hardwareAccelerated="true"
[etc...]
But the following check my custom view's onAttachedToWindow method always returns false
private class MyTextureView extends TextureView
{
public MyTextureView(Context context) {
super(context);
}
@Override
protected void onAttachedToWindow()
{
super.onAttachedToWindow();
Log.d("", Boolean.toString(mTextureView.isHardwareAccelerated()));
}
}
Does anyone know what is wrong here?
Thanks