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
c55c3337
Commit
c55c3337
authored
Jan 09, 2020
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup
parent
8e10c2a9
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
357 additions
and
23 deletions
+357
-23
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
WVClickAbstractListener.java
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
+19
-0
WebJavascriptHandler.kt
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
+10
-0
WebViewClientClickListener.java
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
+7
-0
config.gradle
config.gradle
+5
-5
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+2
-0
im_expert_service_to_right_icon.png
m-im/src/main/res/drawable-xhdpi/im_expert_service_to_right_icon.png
+0
-0
im_expert_consult_service_detail_view.xml
m-im/src/main/res/layout/im_expert_consult_service_detail_view.xml
+14
-1
im_expert_consult_service_item_view.xml
m-im/src/main/res/layout/im_expert_consult_service_item_view.xml
+4
-4
YDLCommonDialog.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/view/dialog/YDLCommonDialog.kt
+84
-0
platform_ydl_common_dialog_bg.xml
ydl-platform/src/main/res/drawable/platform_ydl_common_dialog_bg.xml
+11
-0
platform_ydl_common_dialog_cancel_btn_bg.xml
ydl-platform/src/main/res/drawable/platform_ydl_common_dialog_cancel_btn_bg.xml
+11
-0
platform_ydl_common_dialog_sure_btn_xlzx_bg.xml
ydl-platform/src/main/res/drawable/platform_ydl_common_dialog_sure_btn_xlzx_bg.xml
+12
-0
platform_ydl_common_dialog_sure_btn_ydl_bg.xml
ydl-platform/src/main/res/drawable/platform_ydl_common_dialog_sure_btn_ydl_bg.xml
+12
-0
platform_ydl_common_dialog_layout.xml
ydl-platform/src/main/res/layout/platform_ydl_common_dialog_layout.xml
+70
-0
styles.xml
ydl-platform/src/main/res/values/styles.xml
+8
-0
H5JsBean.kt
ydl-webview/src/main/java/com/ydl/webview/H5JsBean.kt
+3
-1
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+83
-10
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
c55c3337
...
...
@@ -20,8 +20,8 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
//
public static String appEnv = YDLConstants.ENV_PROD;
//
public static String appEnv = YDLConstants.ENV_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_PROD
;
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
...
...
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
View file @
c55c3337
...
...
@@ -2,6 +2,7 @@ package com.ydl.component.service.web;
import
android.app.Activity
;
import
com.ydl.webview.H5JsBean
;
import
com.ydl.webview.NewH5Activity
;
...
...
@@ -413,4 +414,22 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
}
@Override
public
void
shouldShowTitleBar
(
boolean
isShowTitleBar
)
{
if
(
mContext
instanceof
NewH5Activity
)
{
if
(
isShowTitleBar
)
{
((
NewH5Activity
)
mContext
).
showTitleBar
();
}
else
{
((
NewH5Activity
)
mContext
).
hideJavaTitleBar
();
}
}
}
@Override
public
void
setSelfPageType
(
int
selfType
)
{
if
(
mContext
instanceof
NewH5Activity
)
{
((
NewH5Activity
)
mContext
).
setSelfPageType
(
selfType
);
}
}
}
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
View file @
c55c3337
...
...
@@ -367,6 +367,16 @@ class WebJavascriptHandler : IJavascriptHandler{
"chatUnread"
->
{
wvEnventPro
?.
sendUnReadNum
(
jsData
.
cmd
!!
.
params
?.
callBack
,
jsData
.
cmd
!!
.
params
?.
uid
.
toString
())
}
"showTitleBar"
->
{
jsData
.
cmd
!!
.
params
?.
let
{
wvEnventPro
?.
shouldShowTitleBar
(
it
.
isShowTitleBar
!!
)
}
}
"setSelfPageType"
->
{
jsData
.
cmd
!!
.
params
?.
let
{
wvEnventPro
?.
setSelfPageType
(
it
.
selfPageType
)
}
}
}
}
}
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
View file @
c55c3337
...
...
@@ -175,4 +175,11 @@ public interface WebViewClientClickListener {
// void storePic();
void
sendUnReadNum
(
String
callbackFuncName
,
String
uid
);
//是否展示标题栏
void
shouldShowTitleBar
(
boolean
isShowTitleBar
);
//设置当前页面类型
void
setSelfPageType
(
int
selfType
);
}
config.gradle
View file @
c55c3337
ext
{
kotlin_version
=
"1.3.21"
dev_mode
=
tru
e
dev_mode
=
fals
e
ydl_app
=
[
appName
:
"心理咨询壹点灵"
,
...
...
@@ -69,10 +69,10 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.3
0
"
,
"ydl-platform"
:
"0.0.3
1.1
"
,
//第二步 若干
"ydl-webview"
:
"0.0.
29
"
,
"ydl-webview"
:
"0.0.
30.1
"
,
"ydl-media"
:
"0.0.15"
,
"ydl-pay"
:
"0.0.12"
,
"m-audioim"
:
"0.0.41"
,
...
...
@@ -115,10 +115,10 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform"
:
"0.0.3
0
"
,
"ydl-platform"
:
"0.0.3
1.1
"
,
//第二步 若干
"ydl-webview"
:
"0.0.
29
"
,
"ydl-webview"
:
"0.0.
30.1
"
,
"ydl-media"
:
"0.0.15"
,
"ydl-pay"
:
"0.0.12"
,
"m-audioim"
:
"0.0.41"
,
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
c55c3337
...
...
@@ -82,6 +82,8 @@ import com.yidianling.user.api.service.IUserService;
import
org.jetbrains.annotations.NotNull
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.List
;
...
...
m-im/src/main/res/drawable-xhdpi/im_expert_service_to_right_icon.png
0 → 100644
View file @
c55c3337
367 Bytes
m-im/src/main/res/layout/im_expert_consult_service_detail_view.xml
View file @
c55c3337
...
...
@@ -220,6 +220,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
android:layout_marginBottom=
"70dp"
>
<LinearLayout
android:layout_width=
"0dp"
...
...
@@ -240,6 +241,10 @@
android:textColor=
"#242424"
android:textSize=
"14dp"
/>
</LinearLayout>
<ImageView
android:layout_width=
"16dp"
android:layout_height=
"8dp"
android:src=
"@drawable/im_expert_service_to_right_icon"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_weight=
"1"
...
...
@@ -259,6 +264,10 @@
android:textColor=
"#242424"
android:textSize=
"14dp"
/>
</LinearLayout>
<ImageView
android:layout_width=
"16dp"
android:layout_height=
"8dp"
android:src=
"@drawable/im_expert_service_to_right_icon"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_weight=
"1"
...
...
@@ -278,6 +287,10 @@
android:textColor=
"#242424"
android:textSize=
"14dp"
/>
</LinearLayout>
<ImageView
android:layout_width=
"16dp"
android:layout_height=
"8dp"
android:src=
"@drawable/im_expert_service_to_right_icon"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_weight=
"1"
...
...
@@ -332,7 +345,7 @@
android:id=
"@+id/consult_service_service_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
32
0"
android:text=
"0"
android:textColor=
"#FF5040"
android:textSize=
"20dp"
android:textStyle=
"bold"
/>
...
...
m-im/src/main/res/layout/im_expert_consult_service_item_view.xml
View file @
c55c3337
...
...
@@ -66,7 +66,7 @@
android:id=
"@+id/service_item_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
32
0"
android:text=
"0"
android:textColor=
"#FF5040"
android:textSize=
"16dp"
android:textStyle=
"bold"
...
...
@@ -77,7 +77,7 @@
android:id=
"@+id/service_item_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"/
6
0分钟"
android:text=
"/0分钟"
android:textColor=
"#999999"
android:textSize=
"12dp"
/>
<TextView
...
...
@@ -101,7 +101,7 @@
android:id=
"@+id/service_item_feddbackrate"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
99.9
%"
android:text=
"
0
%"
android:layout_marginLeft=
"1dp"
android:textColor=
"#1A1A1A"
android:textSize=
"12dp"
/>
...
...
@@ -133,7 +133,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:text=
"销量
2244
"
android:text=
"销量
0
"
android:textColor=
"#999999"
android:textSize=
"10dp"
/>
</LinearLayout>
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/view/dialog/YDLCommonDialog.kt
0 → 100644
View file @
c55c3337
package
com.ydl.ydlcommon.view.dialog
import
android.app.Dialog
import
android.content.Context
import
android.os.Bundle
import
android.view.Gravity
import
android.view.WindowManager
import
com.ydl.ydlcommon.R
import
kotlinx.android.synthetic.main.platform_ydl_common_dialog_layout.*
class
YDLCommonDialog
(
context
:
Context
,
private
var
listener
:
OnYDLCommonDialogListener
?):
Dialog
(
context
,
R
.
style
.
platform_dialog_default_style
)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
platform_ydl_common_dialog_layout
)
val
params
=
window
.
attributes
params
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
params
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
window
.
setGravity
(
Gravity
.
CENTER
)
window
.
attributes
=
params
ydl_common_dialog_cancel
.
setOnClickListener
{
listener
?.
onCancel
()
}
ydl_common_dialog_sure
.
setOnClickListener
{
listener
?.
onSure
()
}
}
/**
* 标题
*/
fun
setTitle
(
title
:
String
):
YDLCommonDialog
{
ydl_common_dialog_title
.
text
=
title
return
this
}
/**
* 内容
*/
fun
setDesc
(
desc
:
String
):
YDLCommonDialog
{
ydl_common_dialog_desc
.
text
=
desc
return
this
}
/**
* 左侧按钮
*/
fun
setCancelText
(
cancelText
:
String
):
YDLCommonDialog
{
ydl_common_dialog_cancel
.
text
=
cancelText
return
this
}
/**
* 右侧按钮
*/
fun
setSureText
(
sureText
:
String
):
YDLCommonDialog
{
ydl_common_dialog_sure
.
text
=
sureText
return
this
}
/**
* 根据app包设置右侧按钮主题色,*****************必须调用*****************
*/
fun
setTheme
(
flavor
:
String
):
YDLCommonDialog
{
if
(
flavor
==
"ydl"
)
{
ydl_common_dialog_sure
.
setBackgroundResource
(
R
.
drawable
.
platform_ydl_common_dialog_sure_btn_ydl_bg
)
}
else
{
ydl_common_dialog_sure
.
setBackgroundResource
(
R
.
drawable
.
platform_ydl_common_dialog_sure_btn_xlzx_bg
)
}
return
this
}
interface
OnYDLCommonDialogListener
{
fun
onCancel
()
fun
onSure
()
}
}
\ No newline at end of file
ydl-platform/src/main/res/drawable/platform_ydl_common_dialog_bg.xml
0 → 100644
View file @
c55c3337
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"8dp"
/>
<solid
android:color=
"#ffffff"
/>
</shape>
\ No newline at end of file
ydl-platform/src/main/res/drawable/platform_ydl_common_dialog_cancel_btn_bg.xml
0 → 100644
View file @
c55c3337
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<stroke
android:width=
"0.5dp"
android:color=
"#D8D8D8"
/>
<corners
android:bottomLeftRadius=
"8dp"
/>
</shape>
\ No newline at end of file
ydl-platform/src/main/res/drawable/platform_ydl_common_dialog_sure_btn_xlzx_bg.xml
0 → 100644
View file @
c55c3337
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:endColor=
"#fdbd00"
android:startColor=
"#FFEC8C"
/>
<corners
android:bottomRightRadius=
"8dp"
/>
</shape>
\ No newline at end of file
ydl-platform/src/main/res/drawable/platform_ydl_common_dialog_sure_btn_ydl_bg.xml
0 → 100644
View file @
c55c3337
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:endColor=
"#1DA1F2"
android:startColor=
"#23B2FA"
/>
<corners
android:bottomRightRadius=
"8dp"
/>
</shape>
\ No newline at end of file
ydl-platform/src/main/res/layout/platform_ydl_common_dialog_layout.xml
0 → 100644
View file @
c55c3337
<?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=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"40dp"
android:layout_marginRight=
"40dp"
android:orientation=
"vertical"
android:gravity=
"center_horizontal"
android:background=
"@drawable/platform_ydl_common_dialog_bg"
>
<TextView
android:id=
"@+id/ydl_common_dialog_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:text=
"全部消息设为已读"
android:textSize=
"16dp"
android:textStyle=
"bold"
android:textColor=
"#242424"
android:gravity=
"center"
android:layout_marginTop=
"34dp"
/>
<TextView
android:id=
"@+id/ydl_common_dialog_desc"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:text=
"本操作会将私聊、通知、互动中的所有未读消息设为已读"
android:layout_marginLeft=
"44dp"
android:layout_marginRight=
"44dp"
android:textSize=
"14dp"
android:gravity=
"center"
android:textColor=
"#242424"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"24dp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/ydl_common_dialog_cancel"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
android:gravity=
"center"
tools:text=
"取消"
android:textSize=
"16dp"
android:textColor=
"#666666"
android:background=
"@drawable/platform_ydl_common_dialog_cancel_btn_bg"
/>
<TextView
android:id=
"@+id/ydl_common_dialog_sure"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
android:gravity=
"center"
tools:text=
"全部已读"
android:textSize=
"16dp"
android:textColor=
"@color/white"
android:background=
"@drawable/platform_ydl_common_dialog_sure_btn_ydl_bg"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
ydl-platform/src/main/res/values/styles.xml
View file @
c55c3337
...
...
@@ -23,6 +23,14 @@
<!--四边边距都为0的dialog-->
<style
name=
"platform_dialog_default_style"
parent=
"@android:style/Theme.Dialog"
>
<item
name=
"android:windowBackground"
>
@color/transparent
</item>
<item
name=
"android:windowFrame"
>
@null
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:windowIsTranslucent"
>
true
</item>
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
</style>
<!-- 仿ios普通对话框 -->
<style
name=
"platform_normaldialog_style"
parent=
"@android:style/Theme.Dialog"
>
...
...
ydl-webview/src/main/java/com/ydl/webview/H5JsBean.kt
View file @
c55c3337
...
...
@@ -20,9 +20,11 @@ class H5JsBean {
class
Params
{
var
callBack
:
String
=
""
// 用于回调的js方法名
var
isShowTitleBar
:
Boolean
=
false
//是否展示标题栏
var
selfPageType
:
Int
=
-
1
//当前h5页面
var
user_url
:
String
?
=
null
// 修改预约时间用户网址
var
doc_url
:
String
?
=
null
// 修改预约时间专家网址
var
dsmId
:
Int
=
0
// 修改预约时间参数
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
c55c3337
...
...
@@ -48,6 +48,8 @@ import com.ydl.ydlcommon.utils.StatusBarUtils;
import
com.ydl.ydlcommon.utils.TemporaryUtils
;
import
com.ydl.ydlcommon.utils.URLUtils
;
import
com.ydl.ydlcommon.view.TitleBar
;
import
com.ydl.ydlcommon.view.dialog.CommonDialog
;
import
com.ydl.ydlcommon.view.dialog.YDLCommonDialog
;
import
com.ydl.ydlcommon.view.dialog.YDLShareDialog
;
import
com.yidianling.common.tools.RxDeviceTool
;
import
com.yidianling.common.tools.RxImageTool
;
...
...
@@ -151,6 +153,36 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
boolean
firstVisitWXH5PayUrl
=
true
;
private
String
WX_H5_PAY_HOST
=
"http://testnewm.ydl.com"
;
/**
* 当前页面类型
*/
private
int
selfPageType
=
-
1
;
private
int
TEST_QUESTIONS_PAGE_TYPE
=
1000001
;
//测评题页面
private
YDLCommonDialog
testQuestionsPageReturnDialog
=
null
;
/**
* 设置当前h5页面类型
*
* @param pageType
*/
public
void
setSelfPageType
(
int
pageType
)
{
selfPageType
=
pageType
;
// 如果是测试题页面
if
(
selfPageType
==
TEST_QUESTIONS_PAGE_TYPE
)
{
if
(
null
!=
tb_title
)
{
tb_title
.
setLeftImageListener
(
v
->
{
showTestQuestionPageReturnDialog
();
});
tb_title
.
setOnLeftTextClick
((
view
,
isActive
)
->
{
if
(
isActive
)
{
showTestQuestionPageReturnDialog
();
}
});
}
}
}
public
static
void
start
(
Context
context
,
H5Params
h5Params1
)
{
if
(
null
==
context
)
{
...
...
@@ -493,18 +525,21 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
//js修改UI的操作需要放在UI线程中更新
public
void
hideJavaTitleBar
()
{
tb_title
.
setVisibility
(
View
.
GONE
);
if
(
null
!=
getStatusView
())
{
getStatusView
().
setVisibility
(
View
.
GONE
);
}
runOnUiThread
(()
->
{
tb_title
.
setVisibility
(
View
.
GONE
);
if
(
null
!=
getStatusView
())
{
getStatusView
().
setVisibility
(
View
.
GONE
);
}
});
}
public
void
showTitleBar
()
{
tb_title
.
setVisibility
(
VISIBLE
);
if
(
null
!=
getStatusView
())
{
getStatusView
().
setVisibility
(
VISIBLE
);
}
runOnUiThread
(()
->
{
tb_title
.
setVisibility
(
VISIBLE
);
if
(
null
!=
getStatusView
())
{
getStatusView
().
setVisibility
(
VISIBLE
);
}
});
}
public
void
closeWebKit
()
{
...
...
@@ -1101,7 +1136,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
super
.
finish
();
CookieSyncManager
.
createInstance
(
this
);
CookieSyncManager
.
getInstance
().
startSync
();
//CookieManager.getInstance().removeSessionCookie();
//CookieManager.getInstance().removeSessionCookie();
}
private
void
openImageChooserActivity
()
{
...
...
@@ -1172,8 +1207,22 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override
public
boolean
onKeyDown
(
int
keyCode
,
KeyEvent
event
)
{
/**
* 判断是否是测评题页面,如果是,则走测评题页面的返回逻辑
*/
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
/**
* 是否是测评题目页面
*/
if
(
selfPageType
==
TEST_QUESTIONS_PAGE_TYPE
)
{
showTestQuestionPageReturnDialog
();
return
false
;
}
/**
* 增加逻辑:在高级题测试页面,按物理返回键直接finish当前页面,不走webview.goback()逻辑
*/
if
(
h5Params
.
isControlBack
())
{
...
...
@@ -1185,6 +1234,30 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
return
super
.
onKeyDown
(
keyCode
,
event
);
}
/**
* 测评题返回的时候,弹窗提示用户
*/
public
void
showTestQuestionPageReturnDialog
()
{
if
(
null
==
testQuestionsPageReturnDialog
)
{
testQuestionsPageReturnDialog
=
new
YDLCommonDialog
(
this
,
new
YDLCommonDialog
.
OnYDLCommonDialogListener
()
{
@Override
public
void
onCancel
()
{
finish
();
}
@Override
public
void
onSure
()
{
testQuestionsPageReturnDialog
.
dismiss
();
}
}).
setTitle
(
"你确定要退出测试吗?"
)
.
setDesc
(
"98%的人都说结果很有用哦"
)
.
setCancelText
(
"退出"
)
.
setSureText
(
"继续测试"
)
.
setTheme
(
BuildConfig
.
FLAVOR
);
}
testQuestionsPageReturnDialog
.
show
();
}
@Override
protected
void
onDestroy
()
{
cancelSendNetLossMessage
();
...
...
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