配合H5调整部分webView页面
This commit is contained in:
parent
3510a565f2
commit
2cefd50ac3
@ -59,7 +59,6 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
create();
|
||||
Intent intent = getIntent();
|
||||
if (intent != null) {
|
||||
isFullWindow = getIntent().getBooleanExtra("isFull", false);
|
||||
@ -68,6 +67,7 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
|
||||
}
|
||||
}
|
||||
create();
|
||||
super.onCreate(savedInstanceState);
|
||||
mTag = this.getClass().getSimpleName();
|
||||
setStatusBar();
|
||||
@ -133,7 +133,7 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
/**
|
||||
* 设置透明状态栏
|
||||
*/
|
||||
private void setStatusBar() {
|
||||
public void setStatusBar() {
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
Window window = getWindow();
|
||||
|
@ -5,6 +5,7 @@ import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
@ -12,6 +13,7 @@ import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
@ -82,6 +84,15 @@ public class WebViewActivity extends AbsActivity {
|
||||
return R.layout.activity_webview;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setStatusBar() {
|
||||
getWindow().setStatusBarColor(Color.parseColor("#FFFFFF"));
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
String url = getIntent().getStringExtra(Constants.URL);
|
||||
|
@ -17,8 +17,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
|
||||
android:background="@color/white"
|
||||
android:paddingTop="24dp"
|
||||
android:background="@color/white">
|
||||
tools:visibility="gone">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -5,6 +5,7 @@ import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.provider.MediaStore;
|
||||
@ -12,6 +13,7 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceRequest;
|
||||
@ -75,6 +77,12 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
private View v_spacing;
|
||||
private LinearLayout lt_title;
|
||||
|
||||
@Override
|
||||
public void setStatusBar() {
|
||||
getWindow().setStatusBarColor(Color.parseColor("#FFFFFF"));
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_zhuang_ban;
|
||||
|
Loading…
Reference in New Issue
Block a user