5

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?

Omid Nazifi
  • 5,235
  • 8
  • 30
  • 56
Kamalone
  • 4,045
  • 5
  • 40
  • 64

1 Answers1

1

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?

Ewoks
  • 12,285
  • 8
  • 58
  • 67