0

I have a class which extends FragmentActivity. I want to use getWindowManager().getDefaultDisplay().getMetrics(metrics); to get screen width and height

But getWindowManager gives an error invalid method declaration , return type required

Shabbir Dhangot
  • 8,954
  • 10
  • 58
  • 80
1234567
  • 2,226
  • 4
  • 24
  • 69

1 Answers1

1

you have to use this method.It will work properly getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);

kushan
  • 11
  • 1