I have created a lockscreen for ics which will replace the default lockscreen. In my code I want to use getWindow()
method to set the "android:hardwareAccelerated"
true for increasing the efficiency.
I don't have any activity in the LockScreen.java. So I am not able to use activity.getWindow()
.
I tried with context.getWindow()
and this.getWindow()
also. But still it shows error. How to use getWindow()
method to get the Window object?
I think this is simply method you can call on Activity or class that extend it, because it belongs to it.. :S So either you need to be in activity or you need to pass that activity somehow. and I don't get it how you don't have any Activity?! You would need to have some in this case...
LockScreen is extending some class, no? Which one?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With