diff --git a/app/src/main/java/com/nynja/mobile/communicator/data/conference/ConferenceVideoModule.java b/app/src/main/java/com/nynja/mobile/communicator/data/conference/ConferenceVideoModule.java index bf856e2b93332c0dc9fa952904291d57ee56aef3..95e50ef93518fa0a65bd4b51ac41bfa8d3d0de80 100644 --- a/app/src/main/java/com/nynja/mobile/communicator/data/conference/ConferenceVideoModule.java +++ b/app/src/main/java/com/nynja/mobile/communicator/data/conference/ConferenceVideoModule.java @@ -134,8 +134,11 @@ public class ConferenceVideoModule { } public int getWidthDividerLength(int position) { - if (mActiveVideoParticipantsCount/MAX_VIDEO_FEEDS_COLUIMN_SIZE <= MAX_VIDEO_FEEDS_ROW_SIZE) { - return mActiveVideoParticipantsCount / MAX_VIDEO_FEEDS_COLUIMN_SIZE + 1; //MAX_VIDEO_FEEDS_ROW_SIZE + 1; + if (mActiveVideoParticipantsCount <= MAX_VIDEO_FEEDS_COUNT_PER_PAGE) { + if (mActiveVideoParticipantsCount/MAX_VIDEO_FEEDS_COLUIMN_SIZE <= MAX_VIDEO_FEEDS_ROW_SIZE) { + if (mActiveVideoParticipantsCount <= MAX_VIDEO_FEEDS_COLUIMN_SIZE) return 0; + return MAX_VIDEO_FEEDS_ROW_SIZE + 1; + } } int lastPageBeginer = ((mActiveVideoParticipantsCount / MAX_VIDEO_FEEDS_COUNT_PER_PAGE) * MAX_VIDEO_FEEDS_COUNT_PER_PAGE); if (mActiveVideoParticipantsCount == lastPageBeginer) { @@ -143,15 +146,16 @@ public class ConferenceVideoModule { } if (position < lastPageBeginer) { - return MAX_VIDEO_FEEDS_COUNT_PER_PAGE / MAX_VIDEO_FEEDS_COLUIMN_SIZE - 1; + return MAX_VIDEO_FEEDS_COUNT_PER_PAGE / MAX_VIDEO_FEEDS_COLUIMN_SIZE; } int row = (mActiveVideoParticipantsCount - lastPageBeginer)/MAX_VIDEO_FEEDS_COLUIMN_SIZE; if (row <= MAX_VIDEO_FEEDS_ROW_SIZE) { int rest = (mActiveVideoParticipantsCount - lastPageBeginer)%MAX_VIDEO_FEEDS_COLUIMN_SIZE; if (rest == 0) { + if (row == MAX_VIDEO_FEEDS_ROW_SIZE) return MAX_VIDEO_FEEDS_ROW_SIZE; + if (row == 1) return row; if (row < MAX_VIDEO_FEEDS_ROW_SIZE) return row; - if (position/lastPageBeginer == 1) return row + 1; return row - 1; } return row + 1; @@ -194,7 +198,7 @@ public class ConferenceVideoModule { } private int lastPageWidthDivider2(int lastPageCount) { - if (lastPageCount < MAX_VIDEO_FEEDS_COLUIMN_SIZE) return 1; + //if (lastPageCount < MAX_VIDEO_FEEDS_COLUIMN_SIZE) return 1; return MAX_VIDEO_FEEDS_ROW_SIZE; }