diff --git a/mobile/src/main/java/technology/mainthread/apps/moment/ui/fragment/MomentsFragment.java b/mobile/src/main/java/technology/mainthread/apps/moment/ui/fragment/MomentsFragment.java index 71e6841..a934f0e 100644 --- a/mobile/src/main/java/technology/mainthread/apps/moment/ui/fragment/MomentsFragment.java +++ b/mobile/src/main/java/technology/mainthread/apps/moment/ui/fragment/MomentsFragment.java @@ -89,7 +89,8 @@ private int getSpanCount() { Display display = getActivity().getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); - return size.x / 600; + int i = size.x / 600; + return i > 0 ? i : 1; } @Override