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
e325951b
Commit
e325951b
authored
May 09, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网络状态不显示问题
parent
30958f70
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
90 deletions
+53
-90
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+1
-29
config.gradle
config.gradle
+4
-4
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+34
-24
ConsultantAudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
+6
-9
home_ydl_logo.png
m-home/src/ydl/res/drawable-xhdpi/home_ydl_logo.png
+0
-0
home_footer_view.xml
m-home/src/ydl/res/layout/home_footer_view.xml
+7
-22
MineFragment.java
m-user/src/main/java/com/yidianling/user/mine/MineFragment.java
+1
-1
user_mine_fragment_mine.xml
m-user/src/main/res/layout/user_mine_fragment_mine.xml
+0
-1
No files found.
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
e325951b
...
...
@@ -185,35 +185,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
bt_to_privacy
.
setOnClickListener
{
val
dialog
=
SecretDescriptionDialog
(
this
@MainActivity
,
"感谢您信任并使用壹点灵旗下APP,\\n\n"
+
"我们深知个人隐私的重要性,为了您更好的使用本APP,希望您着重关注:\\n\\n1. 为向您提供交易相关基本功能,我们会收集、使用必要的信息;\\n\n"
+
"2. 基于您的明示授权,我们可能会获取您的位置(为您提供附近的咨询师等)、设备号信息(以保障您账号与交易安全)等信息,您有权拒绝或取消授权;\\n\n"
+
"3. 我们会采业界先进的安全措施保护您的信息安全;\\n\n"
+
"4. 未经您同意,我们不会从第三方处获取、共享或向其提供您的信息;\\n\n"
+
"5. 您可以查询、更正、删除您的个人信息。"
,
object
:
SecretDescriptionDialog
.
OnSecretDescriptionDialogListener
{
override
fun
onCancel
()
{
val
secretDialog
=
SecretDialog
(
this
@MainActivity
,
object
:
SecretDialog
.
OnSecretDialogListener
{
override
fun
onCancel
()
{
ToastUtil
.
toastShort
(
"onCancel"
)
}
override
fun
onSure
()
{
ToastUtil
.
toastShort
(
"nextStep"
)
}
})
secretDialog
?.
show
()
}
override
fun
onSure
()
{
ToastUtil
.
toastShort
(
"nextStep"
)
}
}
)
dialog
.
show
()
startActivity
(
Intent
(
this
@MainActivity
,
TestAppActivity
::
class
.
java
))
}
}
...
...
config.gradle
View file @
e325951b
...
...
@@ -5,10 +5,10 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.48.49.
5
"
,
"m-confide"
:
"0.0.48.49.
7
"
,
"m-consultant"
:
"0.0.59.10"
,
"m-fm"
:
"0.0.29.9"
,
"m-user"
:
"0.0.60.
8
"
,
"m-user"
:
"0.0.60.
11
"
,
"m-home"
:
"0.0.22.3"
,
"m-im"
:
"0.0.18.7"
,
"m-dynamic"
:
"0.0.7.7"
,
...
...
@@ -39,7 +39,7 @@ ext {
"ydl-webview"
:
"0.0.38.31"
,
"ydl-media"
:
"0.0.21.6"
,
"ydl-pay"
:
"0.0.18.9"
,
"m-audioim"
:
"0.0.49.2
8
"
,
"m-audioim"
:
"0.0.49.2
9.1
"
,
"ydl-flutter-base"
:
"0.0.14.14"
,
//以下 几乎不会动
...
...
@@ -122,7 +122,7 @@ ext {
"ydl-webview"
:
"0.0.38.31"
,
"ydl-media"
:
"0.0.21.6"
,
"ydl-pay"
:
"0.0.18.9"
,
"m-audioim"
:
"0.0.49.2
8
"
,
"m-audioim"
:
"0.0.49.2
9.1
"
,
"ydl-flutter-base"
:
"0.0.14.14"
,
//以下 几乎不会动
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
e325951b
...
...
@@ -346,37 +346,34 @@ class AudioHomeActivity :
runOnUiThread
{
var
status
=
-
1
var
netStatus
=
when
(
uid
)
{
listenerUid
!!
.
toInt
()
->
{
0
->
{
if
(
txQuality
in
1
..
2
&&
rxQuality
in
1
..
2
)
{
""
}
else
if
(
txQuality
>=
5
||
rxQuality
>=
5
)
{
"
对方
的网络已断开"
"
您
的网络已断开"
}
else
{
status
=
if
(
txQuality
>=
4
||
rxQuality
>=
4
)
{
0
}
else
{
1
}
"
对方
的网络状况不佳"
"
您
的网络状况不佳"
}
}
0
->
{
else
->
{
if
(
txQuality
in
1
..
2
&&
rxQuality
in
1
..
2
)
{
""
}
else
if
(
txQuality
>=
5
||
rxQuality
>=
5
)
{
"
您
的网络已断开"
"
对方
的网络已断开"
}
else
{
status
=
if
(
txQuality
>=
4
||
rxQuality
>=
4
)
{
0
}
else
{
1
}
"
您
的网络状况不佳"
"
对方
的网络状况不佳"
}
}
else
->
{
""
}
}
showNetStatus
(
netStatus
,
status
)
}
...
...
@@ -605,7 +602,12 @@ class AudioHomeActivity :
waitDisposable
=
Observable
.
interval
(
0
,
100
,
TimeUnit
.
MILLISECONDS
).
subscribeOn
(
Schedulers
.
computation
())
.
take
(
600
).
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
({
tv_change_time_counter
.
text
=
"${60 - it / 10}s"
val
remainTime
=
50
-
it
/
10
if
(
remainTime
<=
0
)
{
waittingStatus
()
}
else
{
tv_change_time_counter
.
text
=
"${remainTime}s"
}
var
result
=
it
.
toFloat
()
/
2.5f
progress_view
.
setProgress
(
result
)
if
(
result
>=
100f
&&
!
iv_hang_up
.
isEnabled
)
{
...
...
@@ -613,10 +615,11 @@ class AudioHomeActivity :
iv_hang_up
.
isEnabled
=
true
iv_hang_up
.
setImageResource
(
R
.
drawable
.
audioim_img_hang_up
)
}
},
{
LogUtil
.
d
(
it
.
message
)
})
{
waittingStatus
()
//
waittingStatus()
if
(!
isConnectSuccess
)
{
//关闭音乐
stopPlaying
()
...
...
@@ -633,7 +636,8 @@ class AudioHomeActivity :
//通话结束或挂断时,上传日志文件
uploadLog
()
showChooseDialog
(
2
)
showToast
(
"对方手机暂时不在身边,请稍后再试"
)
userCloseCalling
()
}
}
...
...
@@ -810,12 +814,12 @@ class AudioHomeActivity :
//挂断按钮可点击
iv_hang_up
.
isEnabled
=
true
iv_hang_up
.
setImageResource
(
R
.
drawable
.
audioim_img_hang_up
)
if
(!
isConnectSuccess
)
{
//页面等待文案调整
tv_waiting
.
visibility
=
View
.
GONE
tv_change_doctor
.
text
=
"对方暂无应答,正在为您切换线路重播"
tv_change_doctor
.
visibility
=
View
.
VISIBLE
}
//
if (!isConnectSuccess) {
//
//页面等待文案调整
//
tv_waiting.visibility = View.GONE
//
tv_change_doctor.text = "对方暂无应答,正在为您切换线路重播"
//
tv_change_doctor.visibility = View.VISIBLE
//
}
if
(!
isShowAXB
)
{
tv_change_route
.
visibility
=
View
.
GONE
}
else
{
...
...
@@ -1073,19 +1077,25 @@ class AudioHomeActivity :
*/
private
fun
showNetStatus
(
msg
:
String
,
status
:
Int
=
0
)
{
LogUtil
.
e
(
"showNetStatus: msg=$msg,status=$status"
)
if
(
TextUtils
.
isEmpty
(
msg
)&&
status
==-
1
){
//todo
return
}
if
(
TextUtils
.
isEmpty
(
msg
))
{
tv_nte_status
.
visibility
=
View
.
GONE
}
else
{
tv_nte_status
.
text
=
msg
if
(
status
==
0
)
{
tv_nte_status
.
setCompoundDrawablesWithIntrinsicBounds
(
ContextCompat
.
getDrawable
(
this
,
R
.
drawable
.
av_audio_wifi_normal
),
null
,
null
,
null
)
tv_nte_status
.
setCompoundDrawablesWithIntrinsicBounds
(
ContextCompat
.
getDrawable
(
this
,
R
.
drawable
.
av_audio_wifi_normal
),
null
,
null
,
null
)
}
if
(
status
==
1
)
{
tv_nte_status
.
setCompoundDrawablesWithIntrinsicBounds
(
ContextCompat
.
getDrawable
(
this
,
R
.
drawable
.
av_audio_wifi_better
),
null
,
null
,
null
)
tv_nte_status
.
setCompoundDrawablesWithIntrinsicBounds
(
ContextCompat
.
getDrawable
(
this
,
R
.
drawable
.
av_audio_wifi_better
),
null
,
null
,
null
)
}
if
(
status
==
-
1
)
{
tv_nte_status
.
setCompoundDrawablesWithIntrinsicBounds
(
null
,
null
,
null
,
null
)
...
...
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
View file @
e325951b
...
...
@@ -326,37 +326,34 @@ class ConsultantAudioHomeActivity : BaseMvpActivity<IConsultantAudioHomeActivity
super
.
onNetworkQuality
(
uid
,
txQuality
,
rxQuality
)
var
status
=
-
1
var
netStatus
=
when
(
uid
)
{
userId
!!
.
toInt
()
->
{
0
->
{
if
(
txQuality
in
1
..
2
&&
rxQuality
in
1
..
2
)
{
""
}
else
if
(
txQuality
>=
5
||
rxQuality
>=
5
)
{
"
对方
的网络已断开"
"
您
的网络已断开"
}
else
{
status
=
if
(
txQuality
>=
4
||
rxQuality
>=
4
)
{
0
}
else
{
1
}
"
对方
的网络状况不佳"
"
您
的网络状况不佳"
}
}
0
->
{
else
->
{
if
(
txQuality
in
1
..
2
&&
rxQuality
in
1
..
2
)
{
""
}
else
if
(
txQuality
>=
5
||
rxQuality
>=
5
)
{
"
您
的网络已断开"
"
对方
的网络已断开"
}
else
{
status
=
if
(
txQuality
>=
4
||
rxQuality
>=
4
)
{
0
}
else
{
1
}
"
您
的网络状况不佳"
"
对方
的网络状况不佳"
}
}
else
->
{
""
}
}
showNetStatus
(
netStatus
,
status
)
...
...
m-home/src/ydl/res/drawable-xhdpi/home_ydl_logo.png
0 → 100644
View file @
e325951b
71.5 KB
m-home/src/ydl/res/layout/home_footer_view.xml
View file @
e325951b
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:paddingTop=
"@dimen/platform_dp_16"
android:paddingBottom=
"@dimen/platform_dp_16"
>
android:orientation=
"horizontal"
>
<View
android:layout_width=
"48dp"
android:layout_height=
"0.5dp"
android:background=
"@color/platform_color_EBEBEB"
android:layout_marginRight=
"@dimen/platform_dp_8"
/>
<TextView
android:layout_width=
"wrap_content"
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:textColor=
"@color/platform_color_999999"
android:textSize=
"@dimen/platform_dp_10"
android:text=
"我是有底线的"
/>
<View
android:layout_width=
"48dp"
android:layout_height=
"0.5dp"
android:layout_marginLeft=
"@dimen/platform_dp_8"
android:background=
"@color/platform_color_EBEBEB"
/>
android:background=
"@color/baby_blue"
android:scaleType=
"centerCrop"
android:src=
"@drawable/home_ydl_logo"
/>
</LinearLayout>
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/mine/MineFragment.java
View file @
e325951b
...
...
@@ -159,7 +159,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
init
();
jtv_test
.
setVisibility
(
BuildConfig
.
DEBUG
?
View
.
VISIBLE
:
View
.
GONE
);
//
jtv_test.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
refreshCouponData
();
}
...
...
m-user/src/main/res/layout/user_mine_fragment_mine.xml
View file @
e325951b
...
...
@@ -553,7 +553,6 @@
android:layout_marginLeft=
"16dp"
android:layout_marginTop=
"20dp"
android:layout_marginRight=
"14dp"
android:layout_marginBottom=
"20dp"
android:elevation=
"4dp"
app:cardCornerRadius=
"6dp"
>
...
...
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