Browse Source

老师端直播间增加翻转摄像头按钮

Pq 2 years ago
parent
commit
3ec33457af

+ 2 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/live/TeacherLiveRoomActivity.java

@@ -278,6 +278,7 @@ public class TeacherLiveRoomActivity extends BaseMVPActivity<ActivityTeacherLive
         mFlSnapUpBarrage = viewBinding.viewMainLayout.flSnapUpBarrage;
         mTvSnapUpBarrage = viewBinding.viewMainLayout.tvSnapUpBarrage;
         llMicContainer = viewBinding.viewMainLayout.llMicContainer;
+        viewBinding.viewMainLayout.mainIvReverseCamera.setOnClickListener(this);
         ivReverseCamera.setOnClickListener(this);
         ivLiveBeauty.setOnClickListener(this);
         ivLiveShare.setOnClickListener(this);
@@ -680,7 +681,7 @@ public class TeacherLiveRoomActivity extends BaseMVPActivity<ActivityTeacherLive
                     .navigation(this, SHARE_LIVE_REQUEST_CODE);
             return;
         }
-        if (id == R.id.iv_reverse_camera) {
+        if (id == R.id.main_iv_reverse_camera || id == R.id.iv_reverse_camera) {
             //翻转摄像头
             presenter.reverseCamera();
             return;

+ 11 - 1
teacher/src/main/res/layout/view_live_room_main_layout.xml

@@ -38,7 +38,7 @@
 
         <TextView
             android:id="@+id/tv_room_author_name"
-            android:layout_width="wrap_content"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_marginStart="9dp"
             android:ellipsize="end"
@@ -88,6 +88,16 @@
                 tools:text="176人" />
         </LinearLayout>
 
+        <ImageView
+            android:id="@+id/main_iv_reverse_camera"
+            android:layout_marginEnd="5dp"
+            app:layout_constraintRight_toLeftOf="@+id/ll_member_num_bg"
+            app:layout_constraintBottom_toBottomOf="@+id/ll_member_num_bg"
+            app:layout_constraintTop_toTopOf="@+id/ll_member_num_bg"
+            android:src="@drawable/icon_live_reverse_camera"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"/>
+
         <LinearLayout
             android:id="@+id/ll_like"
             android:layout_width="wrap_content"