File tree Expand file tree Collapse file tree
Android/APIExample/app/src/main/java/io/agora/api/example/examples/basic Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ public void onClick(View v)
192192 * 2:If you call the leaveChannel method during CDN live streaming, the SDK
193193 * triggers the removeInjectStreamUrl method.*/
194194 engine .leaveChannel ();
195+ clearRemoteViews ();
195196 join .setText (getString (R .string .join ));
196197 }
197198 }
@@ -513,6 +514,15 @@ public void onRtcStats(io.agora.rtc.IRtcEngineEventHandler.RtcStats rtcStats) {
513514 }
514515 };
515516
517+ private void clearRemoteViews () {
518+ remoteViews .clear ();
519+ fl_remote .removeAllViews ();
520+ fl_remote_2 .removeAllViews ();
521+ fl_remote_3 .removeAllViews ();
522+ fl_remote_4 .removeAllViews ();
523+ fl_remote_5 .removeAllViews ();
524+ }
525+
516526 private ViewGroup getAvailableView () {
517527 if (fl_remote .getChildCount () == 0 ){
518528 return fl_remote ;
You can’t perform that action at this time.
0 commit comments