Commit a61df9ec by 徐健

backup

parent 3b4c669b
......@@ -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.32.4",
"ydl-webview" : "0.0.33.2",
"ydl-media" : "0.0.16",
"ydl-pay" : "0.0.13",
"m-audioim" : "0.0.42",
......
......@@ -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() {
hideJavaTitleBar();
coverJavaTitleBar();
testQuestionsPageReturnDialog.dismiss();
}
}).setTitle("你确定要退出测试吗?")
......
......@@ -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"
......
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