I am trying to implement the example shown on this page . I tried 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 turned on hardware acceleration in the application manifest:
<application
android:hardwareAccelerated="true"
[etc...]
But the next check of my custom view 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's wrong here?
thank
tishu source
share