Android display getSize() before API level 13
android
Solution
Try:
width=display.getWidth();
height=display.getHeight();
when target is >= Gingerbread
Problem
What would be the equivalent of the getSize() method pre-API level 13? Specifically, I need something that would work with Gingerbread. ``` Context context = getActivity(); Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); Point size = new Point(); display.getSize(size); ```