# Custom UI: display video error

**URL:** <https://devforum.zoom.us/t/custom-ui-display-video-error/117192>\
**Category:** Android\
**Tags:** android\
**Created:** [September 10, 2024, 5:19am UTC](https://devforum.zoom.us/t/custom-ui-display-video-error/117192 "2024-09-10T05:19:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![letuan1999v5](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/letuan1999v5/32/49285_2.png) [@letuan1999v5](https://devforum.zoom.us/u/letuan1999v5)\
**Post date:** [September 10, 2024, 5:19am UTC](https://devforum.zoom.us/t/custom-ui-display-video-error/117192/1 "2024-09-10T05:19:47Z")

</div>

I’m trying to display user’s video on the screen, with maximum of 16 units in a time.  
It works well with the first 5 user, but from 6th user, it becomes strange.  
If user turn off the camera, the avatar of that user is displayed. But when user turn on the camera, it become to black.  
The first 5 user’s video do not have this problem.

I use a List to save the id that I want to display, then display it by a loop.

```auto
private void updateView(int page){
        if (page != currentPage){
            zoomViewManager.removeAllVideoUnits();
            currentRenderList.clear(); //if switch to new page, clear the list of video before update
        }
        calculateScreenAllocation(); // arrange video unit
        updateRenderList(page); //update list of video to display
        for (int i = 0; i < renderList.size(); i++){
            MobileRTCVideoUnitRenderInfo info = getRenderInfo(i, renderList.size());
            if (info != null){
                info.is_username_visible = true;
                info.is_show_audio_off = false;
                info.is_border_visible = true;
                info.border_color = -545196360;
                if (!currentRenderList.contains(renderList.get(i))){
                    zoomViewManager.addAttendeeVideoUnit(renderList.get(i), info);
                }
                else{
                    zoomViewManager.updateAttendeeVideoUnit(renderList.get(i), info);
                }
            }
        }
        currentRenderList.clear();
        currentRenderList.addAll(renderList);
        currentPage = page;
    }

```

Is ZOOM android sdk limit the maximum video that I can display on the screen?  
Or is there a problem in my code? Or anything else?

I’m using SDK version 6.1.5.23231

Thank you for any help.

---

<div class="post-metadata">

**Author:** ![letuan1999v5](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/letuan1999v5/32/49285_2.png) [@letuan1999v5](https://devforum.zoom.us/u/letuan1999v5)\
**Post date:** [September 10, 2024, 7:56am UTC](https://devforum.zoom.us/t/custom-ui-display-video-error/117192/2 "2024-09-10T07:56:04Z")

</div>

I’ve found the solution for this problem: enable gallery mode by using MobileRTCVideoUnitRenderInfo.enableGalleryMode

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 10, 2024, 5:56pm UTC](https://devforum.zoom.us/t/custom-ui-display-video-error/117192/3 "2024-10-10T17:56:08Z")

</div>

Closed on October 10, 2024, 5:56pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
