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