Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
22643ca0
Commit
22643ca0
authored
Apr 26, 2022
by
upwork.021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加离开群聊房间二次确认弹窗
parent
389058c4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
113 additions
and
15 deletions
+113
-15
MDTMainActivity.java
app/src/main/java/com/ydl/component/rtc/MDTMainActivity.java
+2
-2
TUICallingEntranceActivity.java
app/src/main/java/com/ydl/component/rtc/TUICallingEntranceActivity.java
+1
-1
app_show_tip_dialog_confirm.xml
app/src/main/res/layout/app_show_tip_dialog_confirm.xml
+1
-1
calling_logout_dialog.xml
app/src/main/res/layout/calling_logout_dialog.xml
+4
-4
config.gradle
config.gradle
+1
-1
VideoCallingActivity.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/VideoCallingActivity.java
+20
-6
dialog_leave_room.xml
ydl-tuicore/src/main/res/layout/dialog_leave_room.xml
+74
-0
videocall_activity_calling.xml
ydl-tuicore/src/main/res/layout/videocall_activity_calling.xml
+1
-0
styles.xml
ydl-tuicore/src/main/res/values/styles.xml
+9
-0
No files found.
app/src/main/java/com/ydl/component/rtc/MDTMainActivity.java
View file @
22643ca0
...
@@ -196,8 +196,8 @@ public class MDTMainActivity extends AppCompatActivity {
...
@@ -196,8 +196,8 @@ public class MDTMainActivity extends AppCompatActivity {
private
void
showLogoutDialog
()
{
private
void
showLogoutDialog
()
{
final
Dialog
dialog
=
new
Dialog
(
this
,
R
.
style
.
logoutDialogStyle
);
final
Dialog
dialog
=
new
Dialog
(
this
,
R
.
style
.
logoutDialogStyle
);
dialog
.
setContentView
(
R
.
layout
.
calling_logout_dialog
);
dialog
.
setContentView
(
R
.
layout
.
calling_logout_dialog
);
Button
btnPositive
=
(
Button
)
dialog
.
findViewById
(
R
.
id
.
btn_
positiv
e
);
Button
btnPositive
=
(
Button
)
dialog
.
findViewById
(
R
.
id
.
btn_
sur
e
);
Button
btnNegative
=
(
Button
)
dialog
.
findViewById
(
R
.
id
.
btn_
negative
);
Button
btnNegative
=
(
Button
)
dialog
.
findViewById
(
R
.
id
.
btn_
cancel
);
btnPositive
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
btnPositive
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
...
app/src/main/java/com/ydl/component/rtc/TUICallingEntranceActivity.java
View file @
22643ca0
...
@@ -386,7 +386,7 @@ public class TUICallingEntranceActivity extends Activity {
...
@@ -386,7 +386,7 @@ public class TUICallingEntranceActivity extends Activity {
final
Dialog
dialog
=
new
Dialog
(
this
,
R
.
style
.
logoutDialogStyle
);
final
Dialog
dialog
=
new
Dialog
(
this
,
R
.
style
.
logoutDialogStyle
);
dialog
.
setContentView
(
R
.
layout
.
app_show_tip_dialog_confirm
);
dialog
.
setContentView
(
R
.
layout
.
app_show_tip_dialog_confirm
);
TextView
tvMessage
=
dialog
.
findViewById
(
R
.
id
.
tv_message
);
TextView
tvMessage
=
dialog
.
findViewById
(
R
.
id
.
tv_message
);
Button
btnOk
=
dialog
.
findViewById
(
R
.
id
.
btn_
negative
);
Button
btnOk
=
dialog
.
findViewById
(
R
.
id
.
btn_
cancel
);
tvMessage
.
setText
(
R
.
string
.
app_permission_hint
);
tvMessage
.
setText
(
R
.
string
.
app_permission_hint
);
btnOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
btnOk
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
...
...
app/src/main/res/layout/app_show_tip_dialog_confirm.xml
View file @
22643ca0
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
app:layout_constraintTop_toBottomOf=
"@id/view_divide"
>
app:layout_constraintTop_toBottomOf=
"@id/view_divide"
>
<Button
<Button
android:id=
"@+id/btn_
negative
"
android:id=
"@+id/btn_
cancel
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_height=
"44dp"
android:background=
"@android:color/transparent"
android:background=
"@android:color/transparent"
...
...
app/src/main/res/layout/calling_logout_dialog.xml
View file @
22643ca0
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
app:layout_constraintBottom_toBottomOf=
"parent"
>
app:layout_constraintBottom_toBottomOf=
"parent"
>
<Button
<Button
android:id=
"@+id/btn_
negative
"
android:id=
"@+id/btn_
cancel
"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
android:background=
"@android:color/transparent"
...
@@ -55,10 +55,10 @@
...
@@ -55,10 +55,10 @@
app:layout_constraintBottom_toBottomOf=
"@id/cl_button_panel"
app:layout_constraintBottom_toBottomOf=
"@id/cl_button_panel"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toLeftOf=
"@id/cl_button_panel"
app:layout_constraintLeft_toLeftOf=
"@id/cl_button_panel"
app:layout_constraintRight_toLeftOf=
"@+id/btn_
positiv
e"
/>
app:layout_constraintRight_toLeftOf=
"@+id/btn_
sur
e"
/>
<Button
<Button
android:id=
"@+id/btn_
positiv
e"
android:id=
"@+id/btn_
sur
e"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
android:background=
"@android:color/transparent"
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
android:textSize=
"17sp"
android:textSize=
"17sp"
app:layout_constraintBottom_toBottomOf=
"@id/cl_button_panel"
app:layout_constraintBottom_toBottomOf=
"@id/cl_button_panel"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toRightOf=
"@id/btn_
negative
"
app:layout_constraintLeft_toRightOf=
"@id/btn_
cancel
"
app:layout_constraintRight_toRightOf=
"@id/cl_button_panel"
/>
app:layout_constraintRight_toRightOf=
"@id/cl_button_panel"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
config.gradle
View file @
22643ca0
...
@@ -33,7 +33,7 @@ ext {
...
@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
//mdt 组件
//mdt 组件
"ydl-tuicore"
:
"0.0.2
0
"
,
"ydl-tuicore"
:
"0.0.2
1
"
,
// "m-tuicore-ydl" : "0.0.10",
// "m-tuicore-ydl" : "0.0.10",
//第一步
//第一步
"ydl-platform"
:
"0.0.40.96"
,
"ydl-platform"
:
"0.0.40.96"
,
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/VideoCallingActivity.java
View file @
22643ca0
package
com
.
tencent
.
qcloud
.
tuicore
.
calling
.
videocall
;
package
com
.
tencent
.
qcloud
.
tuicore
.
calling
.
videocall
;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
android.app.Dialog
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
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.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.tencent.imsdk.v2.V2TIMCallback
;
import
com.tencent.imsdk.v2.V2TIMCreateGroupMemberInfo
;
import
com.tencent.imsdk.v2.V2TIMGroupInfo
;
import
com.tencent.imsdk.v2.V2TIMGroupListener
;
import
com.tencent.imsdk.v2.V2TIMGroupListener
;
import
com.tencent.imsdk.v2.V2TIMGroupMemberInfo
;
import
com.tencent.imsdk.v2.V2TIMGroupMemberInfo
;
import
com.tencent.imsdk.v2.V2TIMManager
;
import
com.tencent.imsdk.v2.V2TIMManager
;
...
@@ -250,9 +249,8 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
...
@@ -250,9 +249,8 @@ 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
||
id
==
R
.
id
.
tv_leave
)
{
if
(
id
==
R
.
id
.
tv_leave
)
{
exitRoom
();
showLeaveRoom
();
finish
();
}
else
if
(
id
==
R
.
id
.
btn_audio
)
{
}
else
if
(
id
==
R
.
id
.
btn_audio
)
{
muteAudio
();
muteAudio
();
}
else
if
(
id
==
R
.
id
.
btn_video
)
{
}
else
if
(
id
==
R
.
id
.
btn_video
)
{
...
@@ -538,4 +536,20 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
...
@@ -538,4 +536,20 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
}
}
}
}
/**
* 退出房间
*/
private
void
showLeaveRoom
()
{
final
Dialog
dialog
=
new
Dialog
(
this
,
R
.
style
.
DialogStyle
);
dialog
.
setContentView
(
R
.
layout
.
dialog_leave_room
);
Button
btnSure
=
dialog
.
findViewById
(
R
.
id
.
btn_sure
);
Button
btnCancel
=
dialog
.
findViewById
(
R
.
id
.
btn_cancel
);
btnSure
.
setOnClickListener
(
v
->
{
exitRoom
();
finish
();
});
btnCancel
.
setOnClickListener
(
v
->
dialog
.
dismiss
());
dialog
.
show
();
}
}
}
ydl-tuicore/src/main/res/layout/dialog_leave_room.xml
0 → 100644
View file @
22643ca0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"270dp"
android:layout_height=
"142dp"
android:layout_gravity=
"center"
android:background=
"@drawable/bg_edit_text"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30dp"
android:paddingLeft=
"12dp"
android:paddingRight=
"12dp"
android:text=
"你确定要离开房间吗?"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<View
android:id=
"@+id/view_divide"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginBottom=
"43dp"
android:background=
"@color/trtccalling_color_text_search_hit"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"43dp"
android:background=
"@color/trtccalling_color_text_search_hit"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_button_panel"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintBottom_toBottomOf=
"parent"
>
<Button
android:id=
"@+id/btn_cancel"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
android:text=
"取消"
android:textColor=
"@color/text_color_gray"
android:textSize=
"17sp"
android:textStyle=
"bold"
app:layout_constraintBottom_toBottomOf=
"@id/cl_button_panel"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toLeftOf=
"@id/cl_button_panel"
app:layout_constraintRight_toLeftOf=
"@+id/btn_sure"
/>
<Button
android:id=
"@+id/btn_sure"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
android:text=
"确认"
android:textColor=
"@color/font_blue"
android:textSize=
"17sp"
app:layout_constraintBottom_toBottomOf=
"@id/cl_button_panel"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintLeft_toRightOf=
"@id/btn_cancel"
app:layout_constraintRight_toRightOf=
"@id/cl_button_panel"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
ydl-tuicore/src/main/res/layout/videocall_activity_calling.xml
View file @
22643ca0
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:layout_marginStart=
"10dp"
android:layout_marginTop=
"15dp"
android:layout_marginTop=
"15dp"
android:visibility=
"invisible"
android:background=
"@drawable/ic_back_video"
/>
android:background=
"@drawable/ic_back_video"
/>
<TextView
<TextView
...
...
ydl-tuicore/src/main/res/values/styles.xml
View file @
22643ca0
...
@@ -27,4 +27,12 @@
...
@@ -27,4 +27,12 @@
<!--<item name="android:windowIsTranslucent">true</item>-->
<!--<item name="android:windowIsTranslucent">true</item>-->
<!--<item name="android:windowNoTitle">true</item>-->
<!--<item name="android:windowNoTitle">true</item>-->
</style>
</style>
<style
name=
"DialogStyle"
parent=
"@android:style/Theme.Holo.Dialog"
>
<item
name=
"android:windowIsFloating"
>
false
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowCloseOnTouchOutside"
>
true
</item>
<item
name=
"android:windowBackground"
>
@color/trtccalling_color_countrycode_bg_dialog
</item>
<item
name=
"android:windowSoftInputMode"
>
adjustResize
</item>
</style>
</resources>
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment