Fragment获取屏幕宽高

Display display = getActivity().getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int widths = size.x;
int height = size.y;

你可能感兴趣的:(Fragment获取屏幕宽高)