Commit a61df9ec by 徐健

backup

parent 3b4c669b
...@@ -45,7 +45,7 @@ ext { ...@@ -45,7 +45,7 @@ ext {
"m-confide" : "0.0.43", "m-confide" : "0.0.43",
"m-consultant" : "0.0.53", "m-consultant" : "0.0.53",
"m-fm" : "0.0.25", "m-fm" : "0.0.25",
"m-user" : "0.0.44.6", "m-user" : "0.0.44.7",
"m-home" : "0.0.16", "m-home" : "0.0.16",
"m-im" : "0.0.9", "m-im" : "0.0.9",
"m-dynamic" : "0.0.3", "m-dynamic" : "0.0.3",
...@@ -72,7 +72,7 @@ ext { ...@@ -72,7 +72,7 @@ ext {
"ydl-platform" : "0.0.33.4", "ydl-platform" : "0.0.33.4",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.32.4", "ydl-webview" : "0.0.33.2",
"ydl-media" : "0.0.16", "ydl-media" : "0.0.16",
"ydl-pay" : "0.0.13", "ydl-pay" : "0.0.13",
"m-audioim" : "0.0.42", "m-audioim" : "0.0.42",
......
...@@ -101,6 +101,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -101,6 +101,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private String rightText = ""; private String rightText = "";
protected TitleBar tb_title; protected TitleBar tb_title;
protected View tb_title_cover_v;
protected ImageView backgroundView; protected ImageView backgroundView;
protected ProgressWebView wv_content; protected ProgressWebView wv_content;
protected PtrFrameLayout store_house_ptr_frame; protected PtrFrameLayout store_house_ptr_frame;
...@@ -161,6 +162,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -161,6 +162,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private int TEST_QUESTIONS_PAGE_TYPE = 1000001; //测评题页面 private int TEST_QUESTIONS_PAGE_TYPE = 1000001; //测评题页面
private YDLCommonDialog testQuestionsPageReturnDialog = null; private YDLCommonDialog testQuestionsPageReturnDialog = null;
private boolean isTitleBarCover = false; // 标题栏是否被覆盖隐藏
/** /**
* 设置当前h5页面类型 * 设置当前h5页面类型
...@@ -174,10 +176,14 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -174,10 +176,14 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
if (selfPageType == TEST_QUESTIONS_PAGE_TYPE) { if (selfPageType == TEST_QUESTIONS_PAGE_TYPE) {
if (null != tb_title) { if (null != tb_title) {
tb_title.setImageListener(v -> { tb_title.setImageListener(v -> {
showTestQuestionPageReturnDialog(); if (!isTitleBarCover) {
showTestQuestionPageReturnDialog();
}
}); });
tb_title.setOnLeftTextClick((view, isActive) -> { tb_title.setOnLeftTextClick((view, isActive) -> {
showTestQuestionPageReturnDialog(); if (!isTitleBarCover) {
showTestQuestionPageReturnDialog();
}
}); });
} }
} }
...@@ -509,6 +515,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -509,6 +515,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private void initView() { private void initView() {
tb_title = (TitleBar) findViewById(R.id.tb_title); tb_title = (TitleBar) findViewById(R.id.tb_title);
tb_title_cover_v = (View) findViewById(R.id.tb_title_cover_v);
tb_title.setPaddingLeft(10); tb_title.setPaddingLeft(10);
wv_content = (ProgressWebView) findViewById(R.id.wv_content); wv_content = (ProgressWebView) findViewById(R.id.wv_content);
backgroundView = findViewById(R.id.iv_background); backgroundView = findViewById(R.id.iv_background);
...@@ -545,6 +552,21 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -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() { public void closeWebKit() {
finish(); finish();
} }
...@@ -1250,7 +1272,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -1250,7 +1272,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override @Override
public void onSure() { public void onSure() {
hideJavaTitleBar(); coverJavaTitleBar();
testQuestionsPageReturnDialog.dismiss(); testQuestionsPageReturnDialog.dismiss();
} }
}).setTitle("你确定要退出测试吗?") }).setTitle("你确定要退出测试吗?")
......
...@@ -16,13 +16,25 @@ ...@@ -16,13 +16,25 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> 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:id="@+id/tb_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height" android:layout_height="@dimen/title_bar_height"
android:background="@color/platform_white" android:background="@color/platform_white"
app:pa_title_text="加载中" /> 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 <com.ydl.webview.SafeTipView
android:id="@+id/safe_tip_view" android:id="@+id/safe_tip_view"
android:layout_width="match_parent" android:layout_width="match_parent"
......
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