我的页面,菜单全部改为webView跳转
This commit is contained in:
parent
06a2621e0f
commit
d0ae3c49d4
@ -224,6 +224,12 @@
|
||||
android:label="修改密码"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.setting.WebViewActivity"
|
||||
android:label="WebView"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="com.shayu.onetoone.fileprovider"
|
||||
|
@ -31,6 +31,7 @@ import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.setting.SettingActivity;
|
||||
import com.shayu.onetoone.activity.setting.WebViewActivity;
|
||||
import com.shayu.onetoone.adapter.MainMeAdapter;
|
||||
import com.shayu.onetoone.bean.SlideBean;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
@ -40,7 +41,6 @@ import com.shayu.onetoone.view.CustomMyViewHolder;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.GoogleBean;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
@ -415,19 +415,19 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
if (TextUtils.isEmpty(url)) {
|
||||
switch (bean.getId()) {
|
||||
case 1:
|
||||
forwardProfit();
|
||||
//forwardProfit();
|
||||
break;
|
||||
case 2:
|
||||
forwardCoin();
|
||||
//forwardCoin();
|
||||
break;
|
||||
case 13:
|
||||
forwardSetting();
|
||||
//forwardSetting();
|
||||
break;
|
||||
case 19:
|
||||
forwardMyVideo();
|
||||
//forwardMyVideo();
|
||||
break;
|
||||
case 20:
|
||||
forwardRoomManage();
|
||||
//forwardRoomManage();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
@ -0,0 +1,443 @@
|
||||
package com.shayu.onetoone.activity.setting;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.AndroidBug5497Workaround;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.HintCustomPopup;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Stack;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/9/25.
|
||||
*/
|
||||
|
||||
public class WebViewActivity extends AbsActivity {
|
||||
|
||||
private FrameLayout ft_title;
|
||||
private ImageView btnEdit;
|
||||
private ProgressBar mProgressBar;
|
||||
private WebView mWebView;
|
||||
private final int CHOOSE = 100;//Android 5.0以下的
|
||||
private final int CHOOSE_ANDROID_5 = 200;//Android 5.0以上的
|
||||
private ValueCallback<Uri> mValueCallback;
|
||||
private ValueCallback<Uri[]> mValueCallback2;
|
||||
private int indexInto = 0;
|
||||
private View v_spacing;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_webview;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
String url = getIntent().getStringExtra(Constants.URL);
|
||||
L.e("H5--->" + url);
|
||||
Bus.getOn(this);
|
||||
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
||||
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||
btnEdit = (ImageView) findViewById(R.id.btn_edit);
|
||||
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
||||
v_spacing = (View) findViewById(R.id.v_spacing);
|
||||
mWebView = findViewById(R.id.webView);
|
||||
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
params.topMargin = DpUtil.dp2px(1);
|
||||
// mWebView.setLayoutParams(params);
|
||||
//mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
mWebView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
L.e("H5-------->" + url);
|
||||
if (url.startsWith(Constants.COPY_PREFIX)) {
|
||||
String content = url.substring(Constants.COPY_PREFIX.length());
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
copy(content);
|
||||
}
|
||||
} else {
|
||||
view.loadUrl(url);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
setTitle(view.getTitle());
|
||||
if (url.contains("for")) {
|
||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||
}
|
||||
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
||||
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
|
||||
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
||||
if (!navigationGestureEnabled(mContext)) {
|
||||
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
mWebView.setWebChromeClient(new WebChromeClient() {
|
||||
@Override
|
||||
public void onProgressChanged(WebView view, int newProgress) {
|
||||
if (mProgressBar != null) {
|
||||
if (newProgress == 100) {
|
||||
mProgressBar.setVisibility(View.GONE);
|
||||
} else {
|
||||
mProgressBar.setProgress(newProgress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//以下是在各个Android版本中 WebView调用文件选择器的方法
|
||||
// For Android < 3.0
|
||||
public void openFileChooser(ValueCallback<Uri> valueCallback) {
|
||||
openImageChooserActivity(valueCallback);
|
||||
}
|
||||
|
||||
// For Android >= 3.0
|
||||
public void openFileChooser(ValueCallback valueCallback, String acceptType) {
|
||||
openImageChooserActivity(valueCallback);
|
||||
}
|
||||
|
||||
//For Android >= 4.1
|
||||
public void openFileChooser(ValueCallback<Uri> valueCallback,
|
||||
String acceptType, String capture) {
|
||||
openImageChooserActivity(valueCallback);
|
||||
}
|
||||
|
||||
// For Android >= 5.0
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public boolean onShowFileChooser(WebView webView,
|
||||
ValueCallback<Uri[]> filePathCallback,
|
||||
FileChooserParams fileChooserParams) {
|
||||
mValueCallback2 = filePathCallback;
|
||||
Intent intent = fileChooserParams.createIntent();
|
||||
startActivityForResult(intent, CHOOSE_ANDROID_5);
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(mContext, mWebView).setPageClose(true).setLiveZhuangBana(false), "androidObject");
|
||||
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
||||
mWebView.getSettings().setDomStorageEnabled(true);
|
||||
String appCachePath = mContext.getCacheDir().getAbsolutePath();
|
||||
// mWebView.getSettings().setAppCachePath(appCachePath);
|
||||
mWebView.getSettings().setAllowFileAccess(true);
|
||||
mWebView.getSettings().setUseWideViewPort(true); // 关键点
|
||||
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
mWebView.loadUrl(url);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
|
||||
|
||||
if (btnEdit != null) {
|
||||
if (Constants.myIntoIndex == 2) {
|
||||
ft_title.setVisibility(View.GONE);
|
||||
btnEdit.setVisibility(View.GONE);
|
||||
v_spacing.setVisibility(View.VISIBLE);
|
||||
|
||||
} else if (Constants.myIntoIndex == 1) {
|
||||
v_spacing.setVisibility(View.GONE);
|
||||
} else {
|
||||
btnEdit.setVisibility(View.GONE);
|
||||
ft_title.setVisibility(View.VISIBLE);
|
||||
v_spacing.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void openImageChooserActivity(ValueCallback<Uri> valueCallback) {
|
||||
mValueCallback = valueCallback;
|
||||
Intent intent = new Intent();
|
||||
if (Build.VERSION.SDK_INT < 19) {
|
||||
intent.setAction(Intent.ACTION_GET_CONTENT);
|
||||
} else {
|
||||
intent.setAction(Intent.ACTION_PICK);
|
||||
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||
}
|
||||
intent.setType("image/*");
|
||||
startActivityForResult(Intent.createChooser(intent, mContext.getString(R.string.choose_flie)), CHOOSE);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
||||
super.onActivityResult(requestCode, resultCode, intent);
|
||||
switch (requestCode) {
|
||||
case CHOOSE://5.0以下选择图片后的回调
|
||||
processResult(resultCode, intent);
|
||||
break;
|
||||
case CHOOSE_ANDROID_5://5.0以上选择图片后的回调
|
||||
processResultAndroid5(resultCode, intent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void processResult(int resultCode, Intent intent) {
|
||||
if (mValueCallback == null) {
|
||||
return;
|
||||
}
|
||||
if (resultCode == RESULT_OK && intent != null) {
|
||||
Uri result = intent.getData();
|
||||
mValueCallback.onReceiveValue(result);
|
||||
} else {
|
||||
mValueCallback.onReceiveValue(null);
|
||||
}
|
||||
mValueCallback = null;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
private void processResultAndroid5(int resultCode, Intent intent) {
|
||||
if (mValueCallback2 == null) {
|
||||
return;
|
||||
}
|
||||
if (resultCode == RESULT_OK && intent != null) {
|
||||
mValueCallback2.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, intent));
|
||||
} else {
|
||||
mValueCallback2.onReceiveValue(null);
|
||||
}
|
||||
mValueCallback2 = null;
|
||||
}
|
||||
|
||||
private static boolean mIsLive = false;
|
||||
|
||||
public static void forward(Context context, String url, boolean addArgs, boolean isLive) {
|
||||
mIsLive = isLive;
|
||||
if (Constants.LoginKefu) {
|
||||
if (addArgs) {
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
|
||||
}
|
||||
}
|
||||
Intent intent = new Intent(context, WebViewActivity.class);
|
||||
intent.putExtra(Constants.URL, url + "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url, boolean isLive) {
|
||||
forward(context, url, true, isLive);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
if (mWebView != null) {
|
||||
ViewGroup parent = (ViewGroup) mWebView.getParent();
|
||||
if (parent != null) {
|
||||
parent.removeView(mWebView);
|
||||
}
|
||||
mWebView.destroy();
|
||||
}
|
||||
Constants.myIntoIndex = 0;
|
||||
indexInto = 0;
|
||||
Constants.LoginKefu = true;
|
||||
Bus.getOff(this);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制到剪贴板
|
||||
*/
|
||||
private void copy(String content) {
|
||||
ClipboardManager cm = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
|
||||
ClipData clipData = ClipData.newPlainText("text", content);
|
||||
cm.setPrimaryClip(clipData);
|
||||
ToastUtil.show(getString(R.string.copy_success));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (Constants.myIntoIndex == 2 && mWebView != null && indexInto == 1) {
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
mWebView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String method = "reload()";//拼接参数,就可以把数据传递给js
|
||||
mWebView.evaluateJavascript(method, new ValueCallback<String>() {
|
||||
@Override
|
||||
public void onReceiveValue(String value) {
|
||||
// Log.i("qcl0228", "js返回的数据" + value);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
mWebView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mWebView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
mWebView.loadUrl("javascript:reload()");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
indexInto = 0;
|
||||
}
|
||||
if (Constants.isShowPage != -1) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onJavascriptInterfaceEvent(JavascriptInterfaceEvent event) {
|
||||
indexInto = event.getIndexInto();
|
||||
if (event.getMethod().equals("androidInviteShare")) {
|
||||
try {
|
||||
Class<?> clz = mContext.getClassLoader().loadClass("com.yunbao.share.ui.InvitePopDialog");
|
||||
Object invite = clz.getConstructor(Context.class).newInstance(mContext);
|
||||
invite = invite.getClass().getMethod("setUrl", String.class).invoke(invite, event.getData());
|
||||
assert invite != null;
|
||||
invite.getClass().getMethod("showDialog").invoke(invite);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} else if (TextUtils.equals(event.getMethod(), "clickLogOffAccount")) {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new HintCustomPopup(mContext,
|
||||
mContext.getString(R.string.delete_account1),
|
||||
mContext.getString(R.string.delete_account2))
|
||||
.setLiveOpenOk(mContext.getString(R.string.delete_account3))
|
||||
.setLiveOpenCancel(mContext.getString(R.string.cancel))
|
||||
.setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
||||
@Override
|
||||
public void onSure() {
|
||||
LiveNetManager.get(mContext).
|
||||
setLogOff(new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
Stack<Activity> allActivityStacks = AppManager.getInstance().getAllActivityStacks();
|
||||
for (int i = 0; i < allActivityStacks.size(); i++) {
|
||||
if (!(allActivityStacks.get(i) instanceof WebViewActivity)) {
|
||||
allActivityStacks.get(i).finish();
|
||||
}
|
||||
}
|
||||
IMLoginManager.get(mContext).logout(mContext);
|
||||
CommonAppConfig.getInstance().clearLoginInfo();
|
||||
mContext.finish();
|
||||
RouteUtil.forwardLoginActivity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
|
||||
}
|
||||
}))
|
||||
.show();
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
|
||||
//看直播
|
||||
gotoLive(event.getLiveId());
|
||||
}
|
||||
}
|
||||
|
||||
private void gotoLive(final String live_id) {
|
||||
|
||||
LiveHttpUtil.getLiveInfo(live_id, new com.yunbao.common.http.HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
if (MicStatusManager.getInstance().isMic(liveUid)) {
|
||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||
return;
|
||||
}
|
||||
if (mIsLive) {
|
||||
finish();
|
||||
if (MicStatusManager.getInstance().isMic(liveUid)) {
|
||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||
return;
|
||||
}
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)));
|
||||
} else {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckError(String contextError) {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, live_id, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,26 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/rootView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
android:layout_marginTop="@dimen/activity_top"
|
||||
layout="@layout/view_activity_title"
|
||||
<View
|
||||
android:id="@+id/v_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="71dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_height="24dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/ft_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:paddingTop="24dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:onClick="backClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_back"
|
||||
app:tint="@color/textColor" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_edit"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="6dp"
|
||||
android:padding="11dp"
|
||||
android:src="@mipmap/icon_user_home_edit"
|
||||
android:visibility="gone"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressbar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:progressDrawable="@drawable/bg_horizontal_progressbar"
|
||||
android:visibility="gone" />
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user