新增夺宝精灵WebView
This commit is contained in:
@@ -1123,7 +1123,10 @@
|
||||
android:name=".ui.webview.DialogWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.webview.ElfDialogWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name=".ui.webview.DatingRuleWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
|
@@ -10,6 +10,7 @@ import com.mango.moshen.base.BaseActivity;
|
||||
import com.mango.moshen.ui.utils.ImageLoadKt;
|
||||
import com.mango.core.Env;
|
||||
import com.mango.core.auth.AuthModel;
|
||||
import com.mango.moshen.ui.webview.ElfDialogWebViewActivity;
|
||||
|
||||
|
||||
/**
|
||||
@@ -27,6 +28,10 @@ public class LabActivity extends BaseActivity {
|
||||
"http://img.uat.lecheng163.com/mask_trunk_demo.mp4")
|
||||
);
|
||||
|
||||
findViewById(R.id.rb_flutter_test).setOnClickListener(v ->
|
||||
ElfDialogWebViewActivity.start(this, "http://192.168.9.200:5500/view/yinyou/modules/act-treasureSnatching/index.html")
|
||||
);
|
||||
|
||||
//根据ID找到RadioGroup实例
|
||||
RadioGroup group = (RadioGroup) this.findViewById(R.id.radioGroup);
|
||||
RadioButton rbRelease = (RadioButton) findViewById(R.id.rb_release);
|
||||
|
@@ -0,0 +1,36 @@
|
||||
package com.mango.moshen.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 com.mango.moshen.R;
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
|
||||
public class ElfDialogWebViewActivity extends CommonWebViewActivity {
|
||||
|
||||
|
||||
public static void start(Context context, String url) {
|
||||
Intent intent = new Intent(context, ElfDialogWebViewActivity.class);
|
||||
intent.putExtra("url", url);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenWidth * 1100 / 750);
|
||||
getWindow().setGravity(Gravity.BOTTOM);
|
||||
layoutTitleBar.setVisibility(View.GONE);
|
||||
webView.setBackgroundColor(0);
|
||||
webView.getBackground().setAlpha(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_elf_dialog_web_view;
|
||||
}
|
||||
}
|
BIN
app/src/main/res/drawable-xhdpi/bg_elf.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_elf.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
93
app/src/main/res/layout/activity_elf_dialog_web_view.xml
Normal file
93
app/src/main/res/layout/activity_elf_dialog_web_view.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_elf"
|
||||
>
|
||||
|
||||
<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_title_white"
|
||||
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_c6c6e9"
|
||||
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>
|
||||
|
@@ -50,7 +50,7 @@
|
||||
android:background="@color/color_f5f5f5"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="10dp"
|
||||
android:text="flutter测试入口"
|
||||
android:text="夺宝精灵测试入口"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
Reference in New Issue
Block a user