# How can I hide gray rectangle inside video

**URL:** <https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161>\
**Category:** Android\
**Created:** [November 22, 2022, 7:02am UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161 "2022-11-22T07:02:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemeandrajain1991](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hemeandrajain1991/32/43028_2.png) [@hemeandrajain1991](https://devforum.zoom.us/u/hemeandrajain1991)\
**Post date:** [November 22, 2022, 7:02am UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/1 "2022-11-22T07:02:50Z")

</div>

* * *

**Description**  
How can I hide gray rectangle inside video

**Screenshots**

 ![1_Screenshot 2022-11-15 at 11.22.41 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/1/a152c37f91b6fcefa119aa3e9bb39280c45686a5.png)

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [November 22, 2022, 2:01pm UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/2 "2022-11-22T14:01:55Z")

</div>

@hemeandrajain1991,

Welcome to the Zoom Developer Forum - happy to help ! Can you share if you have implemented the default meeting UI or [custom meeting UI](https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/in-meeting-function/customized-meeting-ui/overview)?

---

<div class="post-metadata">

**Author:** ![hemeandrajain1991](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hemeandrajain1991/32/43028_2.png) [@hemeandrajain1991](https://devforum.zoom.us/u/hemeandrajain1991)\
**Post date:** [November 28, 2022, 5:47am UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/3 "2022-11-28T05:47:08Z")

</div>

I implemented using CustomUi

---

<div class="post-metadata">

**Author:** ![hemeandrajain1991](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hemeandrajain1991/32/43028_2.png) [@hemeandrajain1991](https://devforum.zoom.us/u/hemeandrajain1991)\
**Post date:** [November 28, 2022, 5:50am UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/4 "2022-11-28T05:50:54Z")

</div>

Code:

```auto
ZoomSDK zoomSDK = ZoomSDK.getInstance();
MeetingService meetingService = zoomSDK.getMeetingService();
MeetingSettingsHelper meetingSettingsHelper = zoomSDK.getMeetingSettingsHelper();
meetingSettingsHelper.setHideNoVideoUsersEnabled(true);
meetingSettingsHelper.setSwitchVideoLayoutAccordingToUserCountEnabled(true);
meetingSettingsHelper.setSwitchVideoLayoutUserCountThreshold(2);
JoinMeetingOptions options = new JoinMeetingOptions();
options.no_driving_mode = true;
options.no_bottom_toolbar = true;
options.no_chat_msg_toast = true;
options.no_dial_in_via_phone = true;
options.no_dial_out_to_phone = true;
options.custom_meeting_id = "Event Name";
//options.meeting_views_options = MeetingViewsOptions.NO_BUTTON_PARTICIPANTS;
options.meeting_views_options = MeetingViewsOptions.NO_TEXT_MEETING_ID + MeetingViewsOptions.NO_TEXT_PASSWORD + MeetingViewsOptions.NO_BUTTON_PARTICIPANTS;
options.no_share = true;
options.no_invite = true;

JoinMeetingParams params = new JoinMeetingParams();
options.no_titlebar=true;

params.displayName = "ZBO...."+username+""; // TODO: Enter your name
params.meetingNo = mId;
params.password = meetingPassword;
meetingSettingsHelper.setHideNoVideoUsersEnabled(true);
//meetingSettingsHelper.setTurnOffMyVideoWhenJoinMeeting(true);
meetingService.joinMeetingWithParams(context, params, options);

public class MyMeetingActivity extends MeetingActivity {
// Using above activity
}

Fragment UI:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/black"
    android:orientation="horizontal">
<!-- <View-->
<!-- android:layout_toEndOf="@id/ll_MeetingOptions"-->
<!-- android:id="@+id/disable_view_2"-->
<!-- android:layout_marginTop="22dp"-->
<!-- android:layout_width="200dp"-->
<!-- android:layout_height="500dp"/>-->

    <include
        android:id="@+id/meetingContent"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="40dp"
        android:layout_marginEnd="@dimen/zm_dialog_margin_16dp"
        layout="@layout/zm_conf_main_screen" />

        <LinearLayout
            android:id="@+id/ll_MeetingOptions"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:layout_marginTop="22dp"
            android:orientation="vertical" >

            <ImageView
                android:id="@+id/ivLeaveZoomMeeting"
                android:layout_width="35dp"
                android:layout_height="35dp"
                android:scaleType="fitCenter"
                android:src="@drawable/ic_end"
                android:contentDescription="@string/leave" />

            <ImageView
                android:id="@+id/ivMeetingNoAudio"
                android:layout_width="36dp"
                android:layout_height="36dp"
                android:src="@drawable/ic_audio"
                android:layout_marginTop="15dp"
                android:scaleType="fitXY"
                android:contentDescription="@string/audio" />

            <ImageView
                android:id="@+id/ivMeetingSwitchGallery"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/ic_gallery_icon"
                android:layout_marginTop="15dp"
                android:scaleType="fitXY"
                android:contentDescription="@string/gallery" />

            <ImageView
                android:id="@+id/ivMeetingPlayCurrent"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:visibility="gone"
                android:src="@drawable/ic_play"
                android:layout_marginTop="15dp"
                app:tint="@color/sky_blue"
                android:contentDescription="@string/play" />

        </LinearLayout>

    <View
        android:layout_toEndOf="@id/ll_MeetingOptions"
        android:id="@+id/disable_view"
        android:background="@color/transparent"
        android:layout_marginTop="22dp"
        android:layout_width="100dp"
        android:layout_height="150dp"/>
 
</RelativeLayout>

```

---

<div class="post-metadata">

**Author:** ![hemeandrajain1991](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hemeandrajain1991/32/43028_2.png) [@hemeandrajain1991](https://devforum.zoom.us/u/hemeandrajain1991)\
**Post date:** [November 28, 2022, 5:52am UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/5 "2022-11-28T05:52:32Z")

</div>

@donte.zoom please look above and try to resolve issue asap.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [November 28, 2022, 4:15pm UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/6 "2022-11-28T16:15:41Z")

</div>

@hemeandrajain1991 ,

Yes, it is my understanding this is possible to do with a custom UI! You would need to obtain the userId, and then remove them from the `MobileRTCVideoViewManager` associated with the `MobileRTCVideoView` you would not like their video to be displayed in via [`removeAttendeeVideoUnit​`](https://marketplacefront.zoom.us/sdk/meeting/android/us/zoom/sdk/MobileRTCVideoViewManager.html#removeAttendeeVideoUnit(long))

# Customized Meeting UI

[https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/in-meeting-function/customized-meeting-ui/overview/](https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/in-meeting-function/customized-meeting-ui/overview/)

---

<div class="post-metadata">

**Author:** ![hemeandrajain1991](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hemeandrajain1991/32/43028_2.png) [@hemeandrajain1991](https://devforum.zoom.us/u/hemeandrajain1991)\
**Post date:** [November 28, 2022, 5:53pm UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/7 "2022-11-28T17:53:04Z")

</div>

```auto
(MobileRTCVideoView)mGallerySenceView.findViewById(R.id.galleryVideoView);

```

@donte.zoom From where I can get mGallerySenceView in MyMeetingActivity? It would be nice if you can help with this or please share sample example project for configuring MobileRTCVideoView.

---

<div class="post-metadata">

**Author:** ![hemeandrajain1991](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hemeandrajain1991/32/43028_2.png) [@hemeandrajain1991](https://devforum.zoom.us/u/hemeandrajain1991)\
**Post date:** [December 7, 2022, 11:06am UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/8 "2022-12-07T11:06:08Z")

</div>

@donte.zoom @zoom_dev @zoom.admin @zoomdevuk @jackie.chen @vic.yang @boonjun.tan Anyone can solve my query? I am waiting from long time.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [December 7, 2022, 2:59pm UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/9 "2022-12-07T14:59:03Z")

</div>

@hemeandrajain1991

The mGallerySenseView is the layout that the MobileRTCVideoView is at. In our Sample App, we first get the LayoutInflater then inflate the layout named senseView. Then get the VideoView from SenseView.  
I attached the Sample App’s code and the “layout\_meeting\_content\_normal” in our sample App for reference:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/6/b66c076724f279e2e9ce1d351161e45aabc10010.png)

 ![D015E9EA-534E-4DC5-BA89-BE1B8E75C43D](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/9/a99f7cf185488e62355a359ccacc0e20936d05df.jpeg)

Note, in Android Studio on a Windows, macOS or Linux based machine use shortcut Ctrl + Shift + F to search any string in the whole project. It’s easy to remember considering Ctrl + F is used to search in the current file. So just press the Shift to search for Framelayout and or mNormalSenceView for the exact location.

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [December 7, 2022, 3:05pm UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/10 "2022-12-07T15:05:03Z")

</div>

Hi @hemeandrajain1991,

I believe this can only be done in Custom Meeting UI mode according to what @donte.zoom has shared earlier and you can add any customizable view based on your requirements.

I also strongly suggest taking a look at our sample app that is bundled together with our SDK library within the zip file you downloaded from our Marketplace website to have a better understanding of it. You might also want to pay close attention to the MyMeetingActivity.java and my\_meeting\_layout.xml files to see how we build the custom UI out within our sample app. Do take note that after you launch the sample app, you have to first go into “Settings” and enable “Customized UI” in order to see the custom meeting UI.

Thank you.

---

<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:** [January 7, 2023, 1:05am UTC](https://devforum.zoom.us/t/how-can-i-hide-gray-rectangle-inside-video/79161/11 "2023-01-07T01:05:46Z")

</div>

Closed on January 7, 2023, 1:05am UTC

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