Commit 2a3883ed by 范玉宾

set un full screen activity for switch sound

parent 3a23de50
......@@ -492,4 +492,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
((NewH5Activity) mContext).loadUrl(url);
}
}
@Override
public void setWebViewBG(String rgb, String alpha) {
if (mContext instanceof NewH5Activity){
((NewH5Activity)mContext).setBG(rgb, alpha);
}
}
}
......@@ -420,6 +420,14 @@ class WebJavascriptHandler : IJavascriptHandler{
}
}
"webViewBackgroundColor" -> {
jsData.cmd?.params?.let{
val rgb = it.color
val alpha = it.alpha
wvEnventPro?.setWebViewBG(rgb,alpha)
}
}
}
}
}
......@@ -191,4 +191,7 @@ public interface WebViewClientClickListener {
}
//页面内跳转url
void reloadUrl(String url);
default void setWebViewBG(String rgb,String alpha){}
}
......@@ -9,12 +9,12 @@ ext {
"m-consultant" : "0.0.60.25",
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.19",
"m-home" : "0.0.23.72",
"m-home" : "0.0.23.73",
"m-im" : "0.0.21.44",
"m-dynamic" : "0.0.7.73",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.52",
"m-muse" : "0.0.28.54",
"m-tests" : "0.0.24.18",
"m-course" : "0.0.43.37",
......@@ -38,7 +38,7 @@ ext {
"ydl-platform" : "0.0.41.20",
//第二步 若干
"ydl-webview" : "0.0.38.84",
"ydl-webview" : "0.0.38.86",
"ydl-media" : "0.0.21.44",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.94",
......@@ -94,12 +94,12 @@ ext {
"m-consultant" : "0.0.60.25",
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.19",
"m-home" : "0.0.23.72",
"m-home" : "0.0.23.73",
"m-im" : "0.0.21.44",
"m-dynamic" : "0.0.7.73",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.52",
"m-muse" : "0.0.28.54",
"m-tests" : "0.0.24.18",
"m-course" : "0.0.43.37",
//-------------- 业务模块 API 层 --------------
......@@ -121,7 +121,7 @@ ext {
"ydl-platform" : "0.0.41.20",
//第二步 若干
"ydl-webview" : "0.0.38.84",
"ydl-webview" : "0.0.38.86",
"ydl-media" : "0.0.21.44",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.94",
......
......@@ -21,7 +21,8 @@
android:name=".activity.MeditationTimeOffActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<activity android:name=".activity.ChooseMusicActivity" />
<activity android:name=".activity.ChooseMusicActivity"
android:theme="@style/un_full_screen_activity"/>
<service android:name=".service.MeditationWindowService"/>
......
......@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="150dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/shape_bg_solid_282e3f_r_top_20"
>
......
......@@ -31,4 +31,16 @@
<item name="android:windowExitAnimation">@anim/dialog_bottom_exit</item>
</style>
<style name="un_full_screen_activity" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="windowNoTitle">true</item>
<item name="background">@color/transparent</item>
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:backgroundDimAmount">0.5</item>
</style>
</resources>
\ No newline at end of file
......@@ -167,6 +167,9 @@ class H5JsBean {
var buried:String?=null
val color:String?=null
val alpha:String?=null
// meditation end
}
......
......@@ -9,6 +9,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
......@@ -1511,4 +1512,16 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
EventBus.getDefault().post(event);
}
public void setBG(String color,String alpha){
try {
store_house_ptr_frame.setBackgroundColor(Color.parseColor(color));
int a = Integer.valueOf(alpha);
store_house_ptr_frame.getBackground().setAlpha(a);
}catch (Exception ex){
}
}
}
......@@ -3,7 +3,8 @@
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:layout_height="match_parent"
android:id="@+id/rl_root">
<com.ydl.ydlcommon.ui.LogoLoadingView
android:id="@+id/v_loading"
......@@ -51,6 +52,7 @@
android:id="@+id/wv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/platform_transparent"/>
</in.srain.cube.views.ptr.PtrFrameLayout>
</LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment