Commit 10f844d4 by upwork.021

feat: 修改ui

parent 4a55b7de
...@@ -40,11 +40,6 @@ android { ...@@ -40,11 +40,6 @@ android {
ndk { ndk {
abiFilters "arm64-v8a","armeabi-v7a" // 指定要ndk需要兼容的架构(这样其他依赖包里mips,x86,armeabi,arm-v8之类的so会被过滤掉) abiFilters "arm64-v8a","armeabi-v7a" // 指定要ndk需要兼容的架构(这样其他依赖包里mips,x86,armeabi,arm-v8之类的so会被过滤掉)
} }
manifestPlaceholders = [
// TPNS 推送服务 accessId、accessKey
XG_ACCESS_ID : "",
XG_ACCESS_KEY: ""
]
} }
//配置签名文件 //配置签名文件
...@@ -194,8 +189,7 @@ dependencies { ...@@ -194,8 +189,7 @@ dependencies {
implementation(rootProject.ext.dependencies["okhttp3"]) implementation(rootProject.ext.dependencies["okhttp3"])
// TPNS SDK 主工程依赖包 // TPNS SDK 主工程依赖包
implementation 'com.tencent.tpns:tpns:1.3.2.1-release' // implementation 'com.tencent.liteav:LiteAVSDK_TRTC:latest.release'
implementation 'com.tencent.liteav:LiteAVSDK_TRTC:latest.release'
if (true) { if (true) {
......
...@@ -75,7 +75,7 @@ dependencies { ...@@ -75,7 +75,7 @@ dependencies {
kapt "com.alibaba:arouter-compiler:$arouter_compiler" kapt "com.alibaba:arouter-compiler:$arouter_compiler"
api "com.alibaba:arouter-api:$arouter_api" api "com.alibaba:arouter-api:$arouter_api"
api ('com.ydl:ydl-av:1.3.8@aar'){ api ('com.ydl:ydl-av:1.3.4@aar'){
transitive = true transitive = true
} }
......
...@@ -47,6 +47,15 @@ dependencies { ...@@ -47,6 +47,15 @@ dependencies {
implementation(rootProject.ext.dependencies["okhttp3"]) implementation(rootProject.ext.dependencies["okhttp3"])
implementation(rootProject.ext.dependencies["glide"]) implementation(rootProject.ext.dependencies["glide"])
implementation(rootProject.ext.dependencies["gson"]) implementation(rootProject.ext.dependencies["gson"])
if (rootProject.ext.dev_mode){
//开发时使用
api project(':ydl-platform')
}else {
//发布时使用
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
}
implementation "de.hdodenhof:circleimageview:3.1.0" implementation "de.hdodenhof:circleimageview:3.1.0"
implementation "com.blankj:utilcode:1.25.9" implementation "com.blankj:utilcode:1.25.9"
......
...@@ -5,14 +5,15 @@ import android.content.pm.PackageManager; ...@@ -5,14 +5,15 @@ import android.content.pm.PackageManager;
import android.os.Build; import android.os.Build;
import android.widget.Toast; import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat; import androidx.core.app.ActivityCompat;
import com.ydl.ydlcommon.base.BaseActivity;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public abstract class TRTCBaseActivity extends AppCompatActivity { public abstract class TRTCBaseActivity extends BaseActivity {
protected static final int REQ_PERMISSION_CODE = 0x1000; protected static final int REQ_PERMISSION_CODE = 0x1000;
protected int mGrantedCount = 0; protected int mGrantedCount = 0;
......
package com.tencent.liteav.videocall; package com.tencent.liteav.videocall;
import android.content.Intent; import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
...@@ -40,49 +37,45 @@ import java.util.List; ...@@ -40,49 +37,45 @@ import java.util.List;
* *
* - 详见接入文档{https://cloud.tencent.com/document/product/647/42045} * - 详见接入文档{https://cloud.tencent.com/document/product/647/42045}
*/ */
/**
* Video Call
*
* Features:
* - Enter a video call room: {@link VideoCallingActivity#enterRoom()}
* - Exit a video call room: {@link VideoCallingActivity#exitRoom()}
* - Switch between the front and rear cameras: {@link VideoCallingActivity#switchCamera()}
* - Turn on/off the camera: {@link VideoCallingActivity#muteVideo()}
* - Turn on/off the mic: {@link VideoCallingActivity#muteAudio()}
* - Display the video of other users (max. 6) in the room: {@link TRTCCloudImplListener#refreshRemoteVideoViews()}
*
* - For more information, please see the integration document {https://cloud.tencent.com/document/product/647/42045}.
*/
public class VideoCallingActivity extends TRTCBaseActivity implements View.OnClickListener { public class VideoCallingActivity extends TRTCBaseActivity implements View.OnClickListener {
private static final String TAG = "VideoCallingActivity"; private static final String TAG = "VideoCallingActivity";
private static final int OVERLAY_PERMISSION_REQ_CODE = 1234; private static final int OVERLAY_PERMISSION_REQ_CODE = 1234;
private TextView mTextTitle; private TextView mTextTitle;
private TXCloudVideoView mTXCVVLocalPreviewView; private TXCloudVideoView mTXCVVLocalPreviewView;
private ImageView mImageBack; private ImageView mImageBack;
private Button mButtonMuteVideo; private TextView tvLeave;
private Button mButtonMuteAudio; private LinearLayout btnVideo;
private Button mButtonSwitchCamera; private LinearLayout btnAudio;
private Button mButtonAudioRoute; private ImageView ivVideo;
private ImageView ivAudio;
private TRTCCloud mTRTCCloud;
private TXDeviceManager mTXDeviceManager; private TRTCCloud mTRTCCloud;
private boolean mIsFrontCamera = true; private TXDeviceManager mTXDeviceManager;
private List<String> mRemoteUidList; private boolean mIsFrontCamera = true;
private List<TXCloudVideoView> mRemoteViewList; private List<String> mRemoteUidList;
private int mUserCount = 0; private List<TXCloudVideoView> mRemoteViewList;
private String mRoomId; private int mUserCount = 0;
private String mUserId; private String mRoomId;
private boolean mAudioRouteFlag = true; private String mUserId;
private boolean mAudioRouteFlag = true;
@Override
protected void initDataAndEvent() {
handleIntent();
}
@Override
protected int layoutResId() {
return R.layout.videocall_activity_calling;
}
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.videocall_activity_calling);
handleIntent();
if (checkPermission()) { if (checkPermission()) {
initView(); initView();
...@@ -105,29 +98,33 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli ...@@ -105,29 +98,33 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
private void initView() { private void initView() {
mTextTitle = findViewById(R.id.tv_room_number); mTextTitle = findViewById(R.id.tv_room_number);
mImageBack = findViewById(R.id.iv_back); mImageBack = findViewById(R.id.iv_back);
mTXCVVLocalPreviewView = findViewById(R.id.txcvv_main); mTXCVVLocalPreviewView = findViewById(R.id.trtc_view_main);
mButtonMuteVideo = findViewById(R.id.btn_mute_video); btnVideo = findViewById(R.id.btn_video);
mButtonMuteAudio = findViewById(R.id.btn_mute_audio); btnAudio = findViewById(R.id.btn_audio);
mButtonSwitchCamera = findViewById(R.id.btn_switch_camera); btnVideo.setSelected(true);
mButtonAudioRoute = findViewById(R.id.btn_audio_route); btnAudio.setSelected(true);
ivVideo = findViewById(R.id.iv_video);
ivAudio = findViewById(R.id.iv_audio);
tvLeave = findViewById(R.id.tv_leave);
if (!TextUtils.isEmpty(mRoomId)) { if (!TextUtils.isEmpty(mRoomId)) {
mTextTitle.setText("房间号:" + mRoomId); mTextTitle.setText("房间号:" + mRoomId);
} }
mImageBack.setOnClickListener(this); mImageBack.setOnClickListener(this);
mButtonMuteVideo.setOnClickListener(this); btnVideo.setOnClickListener(this);
mButtonMuteAudio.setOnClickListener(this); btnAudio.setOnClickListener(this);
mButtonSwitchCamera.setOnClickListener(this); tvLeave.setOnClickListener(this);
mButtonAudioRoute.setOnClickListener(this);
mRemoteUidList = new ArrayList<>(); mRemoteUidList = new ArrayList<>();
mRemoteViewList = new ArrayList<>(); mRemoteViewList = new ArrayList<>();
mRemoteViewList.add((TXCloudVideoView)findViewById(R.id.trtc_view_1)); mRemoteViewList.add(findViewById(R.id.trtc_view_1));
mRemoteViewList.add((TXCloudVideoView)findViewById(R.id.trtc_view_2)); mRemoteViewList.add(findViewById(R.id.trtc_view_2));
mRemoteViewList.add((TXCloudVideoView)findViewById(R.id.trtc_view_3)); mRemoteViewList.add(findViewById(R.id.trtc_view_3));
mRemoteViewList.add((TXCloudVideoView)findViewById(R.id.trtc_view_4)); mRemoteViewList.add(findViewById(R.id.trtc_view_4));
mRemoteViewList.add((TXCloudVideoView)findViewById(R.id.trtc_view_5)); mRemoteViewList.add(findViewById(R.id.trtc_view_5));
mRemoteViewList.add((TXCloudVideoView)findViewById(R.id.trtc_view_6)); mRemoteViewList.add(findViewById(R.id.trtc_view_6));
mRemoteViewList.add(findViewById(R.id.trtc_view_main));
} }
...@@ -186,63 +183,71 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli ...@@ -186,63 +183,71 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
@Override @Override
public void onClick(View v) { public void onClick(View v) {
int id = v.getId(); int id = v.getId();
if (id == R.id.iv_back) { if (id == R.id.iv_back|| id == R.id.tv_leave) {
finish(); finish();
} else if (id == R.id.btn_mute_video) { } else if (id == R.id.btn_audio){
muteVideo();
} else if (id == R.id.btn_mute_audio) {
muteAudio(); muteAudio();
} else if (id == R.id.btn_switch_camera) { } else if (id == R.id.btn_video){
switchCamera(); muteVideo();
} else if (id == R.id.btn_audio_route) {
audioRoute();
} }
} }
/**
* 操作摄像头打开或者关闭
*/
private void muteVideo() { private void muteVideo() {
boolean isSelected = mButtonMuteVideo.isSelected(); boolean isSelected = btnVideo.isSelected();
if (!isSelected) { if (isSelected) {
mTRTCCloud.stopLocalPreview(); mTRTCCloud.stopLocalPreview();
mButtonMuteVideo.setText("打开摄像头"); ivVideo.setImageResource(R.drawable.trtccalling_ic_me_video_close);
} else { } else {
mTRTCCloud.startLocalPreview(mIsFrontCamera, mTXCVVLocalPreviewView); mTRTCCloud.startLocalPreview(mIsFrontCamera, mTXCVVLocalPreviewView);
mButtonMuteVideo.setText("关闭摄像头"); ivVideo.setImageResource(R.drawable.trtccalling_ic_me_video_open);
} }
mButtonMuteVideo.setSelected(!isSelected); btnVideo.setSelected(!isSelected);
} }
/**
* 操作麦克风开启或者关闭
*/
private void muteAudio() { private void muteAudio() {
boolean isSelected = mButtonMuteAudio.isSelected(); boolean isSelected = btnAudio.isSelected();
if (!isSelected) { if (!isSelected) {
mTRTCCloud.muteLocalAudio(true); mTRTCCloud.muteLocalAudio(true);
mButtonMuteAudio.setText("打开麦克风"); ivAudio.setImageResource(R.drawable.trtccalling_ic_me_audio_open);
} else { } else {
mTRTCCloud.muteLocalAudio(false); mTRTCCloud.muteLocalAudio(false);
mButtonMuteAudio.setText("关闭麦克风"); ivAudio.setImageResource(R.drawable.trtccalling_ic_me_audio_close);
} }
mButtonMuteAudio.setSelected(!isSelected); btnAudio.setSelected(!isSelected);
} }
/**
* 转换摄像头
*/
private void switchCamera() { private void switchCamera() {
mIsFrontCamera = !mIsFrontCamera; mIsFrontCamera = !mIsFrontCamera;
mTXDeviceManager.switchCamera(mIsFrontCamera); mTXDeviceManager.switchCamera(mIsFrontCamera);
if(mIsFrontCamera){ if(mIsFrontCamera){
mButtonSwitchCamera.setText( "使用后置摄像头"); // mButtonSwitchCamera.setText( "使用后置摄像头");
}else{ }else{
mButtonSwitchCamera.setText("使用前置摄像头"); // mButtonSwitchCamera.setText("使用前置摄像头");
} }
} }
/**
* 听筒和扬声器切换
*/
private void audioRoute() { private void audioRoute() {
if(mAudioRouteFlag){ if(mAudioRouteFlag){
mAudioRouteFlag = false; mAudioRouteFlag = false;
mTXDeviceManager.setAudioRoute(TXDeviceManager.TXAudioRoute.TXAudioRouteEarpiece); mTXDeviceManager.setAudioRoute(TXDeviceManager.TXAudioRoute.TXAudioRouteEarpiece);
mButtonAudioRoute.setText("使用扬声器"); // mButtonAudioRoute.setText("使用扬声器");
}else{ }else{
mAudioRouteFlag = true; mAudioRouteFlag = true;
mTXDeviceManager.setAudioRoute(TXDeviceManager.TXAudioRoute.TXAudioRouteSpeakerphone); mTXDeviceManager.setAudioRoute(TXDeviceManager.TXAudioRoute.TXAudioRouteSpeakerphone);
mButtonAudioRoute.setText("使用听筒"); // mButtonAudioRoute.setText("使用听筒");
} }
} }
...@@ -255,6 +260,37 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli ...@@ -255,6 +260,37 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
mContext = new WeakReference<>(activity); mContext = new WeakReference<>(activity);
} }
/**
* 网络质量的实时统计回调
* @param localQuality
* @param remoteQuality
*/
@Override
public void onNetworkQuality(TRTCCloudDef.TRTCQuality localQuality, ArrayList<TRTCCloudDef.TRTCQuality> remoteQuality) {
// public static final int TRTC_QUALITY_UNKNOWN = 0;
// public static final int TRTC_QUALITY_Excellent = 1;
// public static final int TRTC_QUALITY_Good = 2;
// public static final int TRTC_QUALITY_Poor = 3;
// public static final int TRTC_QUALITY_Bad = 4;
// public static final int TRTC_QUALITY_Vbad = 5;
// public static final int TRTC_QUALITY_Down = 6;
}
/**
* 音频麦克风开启或关闭回调
* @param userId
* @param available
*/
@Override
public void onUserAudioAvailable(String userId, boolean available) {
}
/**
* 视频开启或关闭回调
* @param userId
* @param available
*/
@Override @Override
public void onUserVideoAvailable(String userId, boolean available) { public void onUserVideoAvailable(String userId, boolean available) {
Log.d(TAG, "onUserVideoAvailable userId " + userId + ", mUserCount " + mUserCount + ",available " + available); Log.d(TAG, "onUserVideoAvailable userId " + userId + ", mUserCount " + mUserCount + ",available " + available);
...@@ -264,15 +300,14 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli ...@@ -264,15 +300,14 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
return; return;
} }
mRemoteUidList.add(userId); mRemoteUidList.add(userId);
refreshRemoteVideoViews();
} else { } else {
if (index == -1) { if (index == -1) {
return; return;
} }
mTRTCCloud.stopRemoteView(userId); mTRTCCloud.stopRemoteView(userId);
mRemoteUidList.remove(index); mRemoteUidList.remove(index);
refreshRemoteVideoViews();
} }
refreshRemoteVideoViews();
} }
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<solid android:color="@color/color_F0504A" />
<corners android:radius="4dp" />
</shape>
\ No newline at end of file
...@@ -15,13 +15,14 @@ ...@@ -15,13 +15,14 @@
android:id="@+id/iv_back" android:id="@+id/iv_back"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:background="@drawable/common_ic_back" /> android:background="@drawable/common_ic_back" />
<TextView <TextView
android:id="@+id/tv_room_number" android:id="@+id/tv_room_number"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
...@@ -29,13 +30,25 @@ ...@@ -29,13 +30,25 @@
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="20sp" /> android:textSize="20sp" />
<TextView
android:id="@+id/tv_leave"
android:layout_width="60dp"
android:layout_height="28dp"
android:textColor="@color/white"
android:gravity="center"
android:textSize="14sp"
android:layout_marginTop="15dp"
android:layout_marginEnd="16dp"
android:background="@drawable/trtccalling_shape_leave"
android:text="离开" />
</LinearLayout> </LinearLayout>
<com.tencent.rtmp.ui.TXCloudVideoView <com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/trtc_view_1" android:id="@+id/trtc_view_1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/txcvv_main" app:layout_constraintBottom_toTopOf="@id/trtc_view_main"
app:layout_constraintHorizontal_weight="1" app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/trtc_view_2" app:layout_constraintRight_toLeftOf="@id/trtc_view_2"
...@@ -56,7 +69,7 @@ ...@@ -56,7 +69,7 @@
app:layout_constraintVertical_weight="1" /> app:layout_constraintVertical_weight="1" />
<com.tencent.rtmp.ui.TXCloudVideoView <com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/txcvv_main" android:id="@+id/trtc_view_main"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/trtc_view_5" app:layout_constraintBottom_toTopOf="@id/trtc_view_5"
...@@ -73,11 +86,11 @@ ...@@ -73,11 +86,11 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_below="@id/trtc_view_2" android:layout_below="@id/trtc_view_2"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
app:layout_constraintBottom_toBottomOf="@id/txcvv_main" app:layout_constraintBottom_toBottomOf="@id/trtc_view_main"
app:layout_constraintHorizontal_weight="1" app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/txcvv_main" app:layout_constraintLeft_toRightOf="@id/trtc_view_main"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/txcvv_main" app:layout_constraintTop_toTopOf="@id/trtc_view_main"
app:layout_constraintVertical_weight="1" /> app:layout_constraintVertical_weight="1" />
...@@ -104,8 +117,8 @@ ...@@ -104,8 +117,8 @@
app:layout_constraintBottom_toTopOf="@id/ll_bottom" app:layout_constraintBottom_toTopOf="@id/ll_bottom"
app:layout_constraintHorizontal_weight="1" app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="@id/txcvv_main" app:layout_constraintRight_toRightOf="@id/trtc_view_main"
app:layout_constraintTop_toBottomOf="@id/txcvv_main" app:layout_constraintTop_toBottomOf="@id/trtc_view_main"
app:layout_constraintVertical_weight="1" /> app:layout_constraintVertical_weight="1" />
...@@ -114,94 +127,66 @@ ...@@ -114,94 +127,66 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="@id/trtc_view_5" app:layout_constraintBottom_toBottomOf="@id/trtc_view_5"
app:layout_constraintTop_toTopOf="@id/trtc_view_5" app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/trtc_view_5" app:layout_constraintLeft_toRightOf="@id/trtc_view_5"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintHorizontal_weight="1" app:layout_constraintTop_toTopOf="@id/trtc_view_5"
app:layout_constraintVertical_weight="1" /> app:layout_constraintVertical_weight="1" />
<LinearLayout <LinearLayout
android:id="@+id/ll_bottom" android:id="@+id/ll_bottom"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="120dp"
android:layout_alignParentBottom="true" android:background="@color/white"
android:layout_marginLeft="20dp" android:gravity="center_vertical"
android:layout_marginRight="20dp" android:orientation="horizontal"
android:layout_marginBottom="10dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"> app:layout_constraintBottom_toBottomOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="视频选项"
android:textColor="#ff0000"
android:textSize="16sp" />
<LinearLayout <LinearLayout
android:id="@+id/ll_controller" android:id="@+id/btn_audio"
android:layout_width="300dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" android:layout_weight="1"
android:visibility="visible"> android:gravity="center"
android:orientation="vertical">
<Button <ImageView
android:id="@+id/btn_switch_camera" android:id="@+id/iv_audio"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:src="@drawable/trtccalling_ic_me_audio_open" />
android:background="@drawable/common_button_bg"
android:padding="5dp" <TextView
android:text="使用后置摄像头"
android:textColor="@android:color/white" />
<Button
android:id="@+id/btn_mute_video"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_marginTop="6dp"
android:layout_marginLeft="10dp" android:text="麦克风"
android:background="@drawable/common_button_bg" android:textColor="@color/color_8595a9"
android:padding="5dp" android:textSize="14sp" />
android:text="关闭摄像头"
android:textColor="@android:color/white" />
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="音频选项"
android:textColor="#ff0000"
android:textSize="16sp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:id="@+id/btn_video"
android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" android:layout_weight="1"
android:visibility="visible"> android:gravity="center"
android:orientation="vertical">
<Button <ImageView
android:id="@+id/btn_mute_audio" android:id="@+id/iv_video"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:src="@drawable/trtccalling_ic_me_video_open" />
android:background="@drawable/common_button_bg"
android:padding="5dp" <TextView
android:text="关闭麦克风"
android:textColor="@android:color/white" />
<Button
android:id="@+id/btn_audio_route"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_marginTop="6dp"
android:layout_marginLeft="10dp" android:text="摄像头"
android:background="@drawable/common_button_bg" android:textColor="@color/color_8595a9"
android:padding="5dp" android:textSize="14sp" />
android:text="使用听筒"
android:textColor="@android:color/white" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -24,4 +24,6 @@ ...@@ -24,4 +24,6 @@
<color name="trtccalling_color_disable">#DBDBDB</color> <color name="trtccalling_color_disable">#DBDBDB</color>
<color name="trtccalling_color_transparent">#00000000</color> <color name="trtccalling_color_transparent">#00000000</color>
<color name="trtccalling_color_green">#FF29CC85</color> <color name="trtccalling_color_green">#FF29CC85</color>
<color name="color_8595a9">#859aa9</color>
<color name="color_F0504A">#F0504A</color>
</resources> </resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment