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
a61df9ec
Commit
a61df9ec
authored
Jan 14, 2020
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup
parent
3b4c669b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
6 deletions
+40
-6
config.gradle
config.gradle
+2
-2
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+25
-3
web_activity_h5_new.xml
ydl-webview/src/main/res/layout/web_activity_h5_new.xml
+13
-1
No files found.
config.gradle
View file @
a61df9ec
...
...
@@ -45,7 +45,7 @@ ext {
"m-confide"
:
"0.0.43"
,
"m-consultant"
:
"0.0.53"
,
"m-fm"
:
"0.0.25"
,
"m-user"
:
"0.0.44.
6
"
,
"m-user"
:
"0.0.44.
7
"
,
"m-home"
:
"0.0.16"
,
"m-im"
:
"0.0.9"
,
"m-dynamic"
:
"0.0.3"
,
...
...
@@ -72,7 +72,7 @@ ext {
"ydl-platform"
:
"0.0.33.4"
,
//第二步 若干
"ydl-webview"
:
"0.0.3
2.4
"
,
"ydl-webview"
:
"0.0.3
3.2
"
,
"ydl-media"
:
"0.0.16"
,
"ydl-pay"
:
"0.0.13"
,
"m-audioim"
:
"0.0.42"
,
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
a61df9ec
...
...
@@ -101,6 +101,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private
String
rightText
=
""
;
protected
TitleBar
tb_title
;
protected
View
tb_title_cover_v
;
protected
ImageView
backgroundView
;
protected
ProgressWebView
wv_content
;
protected
PtrFrameLayout
store_house_ptr_frame
;
...
...
@@ -161,6 +162,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private
int
TEST_QUESTIONS_PAGE_TYPE
=
1000001
;
//测评题页面
private
YDLCommonDialog
testQuestionsPageReturnDialog
=
null
;
private
boolean
isTitleBarCover
=
false
;
// 标题栏是否被覆盖隐藏
/**
* 设置当前h5页面类型
...
...
@@ -174,10 +176,14 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
if
(
selfPageType
==
TEST_QUESTIONS_PAGE_TYPE
)
{
if
(
null
!=
tb_title
)
{
tb_title
.
setImageListener
(
v
->
{
showTestQuestionPageReturnDialog
();
if
(!
isTitleBarCover
)
{
showTestQuestionPageReturnDialog
();
}
});
tb_title
.
setOnLeftTextClick
((
view
,
isActive
)
->
{
showTestQuestionPageReturnDialog
();
if
(!
isTitleBarCover
)
{
showTestQuestionPageReturnDialog
();
}
});
}
}
...
...
@@ -509,6 +515,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private
void
initView
()
{
tb_title
=
(
TitleBar
)
findViewById
(
R
.
id
.
tb_title
);
tb_title_cover_v
=
(
View
)
findViewById
(
R
.
id
.
tb_title_cover_v
);
tb_title
.
setPaddingLeft
(
10
);
wv_content
=
(
ProgressWebView
)
findViewById
(
R
.
id
.
wv_content
);
backgroundView
=
findViewById
(
R
.
id
.
iv_background
);
...
...
@@ -545,6 +552,21 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
});
}
//js修改UI的操作需要放在UI线程中更新,覆盖标题
public
void
coverJavaTitleBar
()
{
isTitleBarCover
=
true
;
runOnUiThread
(()
->
{
tb_title_cover_v
.
setVisibility
(
VISIBLE
);
});
}
public
void
notCoverTitleBar
()
{
isTitleBarCover
=
false
;
runOnUiThread
(()
->
{
tb_title_cover_v
.
setVisibility
(
GONE
);
});
}
public
void
closeWebKit
()
{
finish
();
}
...
...
@@ -1250,7 +1272,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override
public
void
onSure
()
{
hide
JavaTitleBar
();
cover
JavaTitleBar
();
testQuestionsPageReturnDialog
.
dismiss
();
}
}).
setTitle
(
"你确定要退出测试吗?"
)
...
...
ydl-webview/src/main/res/layout/web_activity_h5_new.xml
View file @
a61df9ec
...
...
@@ -16,13 +16,25 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<com.ydl.ydlcommon.view.TitleBar
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<com.ydl.ydlcommon.view.TitleBar
android:id=
"@+id/tb_title"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/title_bar_height"
android:background=
"@color/platform_white"
app:pa_title_text=
"加载中"
/>
<View
android:id=
"@+id/tb_title_cover_v"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:background=
"#ffffff"
android:visibility=
"gone"
></View>
</RelativeLayout>
<com.ydl.webview.SafeTipView
android:id=
"@+id/safe_tip_view"
android:layout_width=
"match_parent"
...
...
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