星际探索H5背景透明
This commit is contained in:
@@ -1152,8 +1152,11 @@
|
||||
|
||||
<activity
|
||||
android:name="com.nnbc123.app.ui.webview.DialogWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
|
||||
<activity
|
||||
android:name="com.nnbc123.app.ui.webview.RadishDialogWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
|
||||
<activity
|
||||
android:name="com.nnbc123.app.ui.webview.DatingRuleWebViewActivity"
|
||||
@@ -1317,9 +1320,9 @@
|
||||
<activity
|
||||
android:name="com.darsh.multipleimageselect.activities.AlbumSelectActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:exported="false"
|
||||
android:theme="@style/MultipleImageSelectTheme" >
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/MultipleImageSelectTheme">
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
@@ -1327,9 +1330,9 @@
|
||||
<activity
|
||||
android:name="com.darsh.multipleimageselect.activities.ImageSelectActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:exported="false"
|
||||
android:theme="@style/MultipleImageSelectTheme" >
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/MultipleImageSelectTheme">
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
@@ -0,0 +1,42 @@
|
||||
package com.nnbc123.app.ui.webview;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import com.nnbc123.app.R;
|
||||
|
||||
public class RadishDialogWebViewActivity extends CommonWebViewActivity {
|
||||
|
||||
|
||||
public static void start(Context context, String url) {
|
||||
Intent intent = new Intent(context, RadishDialogWebViewActivity.class);
|
||||
intent.putExtra("url", url);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(this));
|
||||
getWindow().setGravity(Gravity.BOTTOM);
|
||||
View layoutRoot = findViewById(R.id.ll_root);
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) layoutRoot.getLayoutParams();
|
||||
layoutParams.height = ScreenUtil.screenWidth * 515 / 375;
|
||||
layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||
layoutRoot.setLayoutParams(layoutParams);
|
||||
layoutTitleBar.setVisibility(View.GONE);
|
||||
webView.setBackgroundColor(0);
|
||||
webView.getBackground().setAlpha(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_radish_dialog_web_view;
|
||||
}
|
||||
}
|
98
app/src/main/res/layout/activity_radish_dialog_web_view.xml
Normal file
98
app/src/main/res/layout/activity_radish_dialog_web_view.xml
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/layout_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/arrow_left" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_close_black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_normal_282828"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_share"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_share_white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:textColor="@color/text_normal_282828"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:text="常见问题" />
|
||||
</FrameLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_drawable"
|
||||
android:visibility="gone" />
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/transparent">
|
||||
|
||||
</WebView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
@@ -15,6 +15,7 @@ import android.view.WindowManager;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nnbc123.app.ui.webview.RadishDialogWebViewActivity;
|
||||
import com.nnbc123.core.statistic.StatisticManager;
|
||||
import com.nnbc123.core.statistic.protocol.StatisticsProtocol;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
@@ -128,16 +129,16 @@ public class PullRadishActivity extends BaseBindingActivity<ActivityPullRadishBi
|
||||
finish();
|
||||
break;
|
||||
case R.id.iv_more:
|
||||
DialogWebViewActivity.start(context, UriProvider.getRadishHelp(), false);
|
||||
RadishDialogWebViewActivity.start(context, UriProvider.getRadishHelp());
|
||||
break;
|
||||
case R.id.iv_history:
|
||||
DialogWebViewActivity.start(context, UriProvider.getRadishHistory(), false);
|
||||
RadishDialogWebViewActivity.start(context, UriProvider.getRadishHistory());
|
||||
break;
|
||||
case R.id.iv_rank:
|
||||
RadishRankingActivity.start(this);
|
||||
break;
|
||||
case R.id.iv_get_key:
|
||||
DialogWebViewActivity.start(context, UriProvider.getRadishKey(), false);
|
||||
RadishDialogWebViewActivity.start(context, UriProvider.getRadishKey());
|
||||
break;
|
||||
case R.id.fl_open:
|
||||
openBox(StringUtils.toInt(mBinding.editNum.getText().toString(), 0));
|
||||
|
Reference in New Issue
Block a user