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