View.ishardwareaccelerated() Is Always False
I've got a View that is hardware accelerated on many devices. Within that View I need to be able to check whether hardware acceleration is used. According to Android SDK document
Solution 1:
I've been pondering this for a while myself. Good to see you figured out what the issue was. The documentation does correctly describe this but it's not terribly clear. "Returns: True if the view is attached to a window and the window is hardware accelerated"
Solution 2:
As Diane Hackborn mentions in this post: https://groups.google.com/forum/#!topic/android-developers/vAH0HAZg0uU
You should check isHardwareAccelerated() after the view was attached to the window - e.g. in onAttachedToWindow()!
Post a Comment for "View.ishardwareaccelerated() Is Always False"