diff --git a/platforms/android/eeuiApp/app/src/main/java/app/eeui/playground/WelcomeActivity.java b/platforms/android/eeuiApp/app/src/main/java/app/eeui/playground/WelcomeActivity.java index aed5e206..5e6f00e9 100755 --- a/platforms/android/eeuiApp/app/src/main/java/app/eeui/playground/WelcomeActivity.java +++ b/platforms/android/eeuiApp/app/src/main/java/app/eeui/playground/WelcomeActivity.java @@ -1,7 +1,12 @@ package app.eeui.playground; +import android.graphics.Color; +import android.os.Build; import android.os.Bundle; import android.os.Handler; +import android.view.View; +import android.view.WindowManager; + import androidx.appcompat.app.AppCompatActivity; import com.alibaba.fastjson.JSONObject; @@ -23,6 +28,7 @@ public class WelcomeActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + fullScreen(); setContentView(R.layout.activity_splash); new Handler().postDelayed(() -> openNext(""), eeuiBase.cloud.welcome(this, new eeuiBase.OnWelcomeListener() { @Override @@ -47,6 +53,18 @@ public void onBackPressed() { } + private void fullScreen() { + getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + WindowManager.LayoutParams lp = getWindow().getAttributes(); + lp.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; + getWindow().setAttributes(lp); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + getWindow().setStatusBarColor(Color.TRANSPARENT); + } + } + private void openNext(String pageUrl) { if (isOpenNext) { return; diff --git a/platforms/android/eeuiApp/app/src/main/res/values-v27/styles.xml b/platforms/android/eeuiApp/app/src/main/res/values-v27/styles.xml new file mode 100644 index 00000000..8e7873e3 --- /dev/null +++ b/platforms/android/eeuiApp/app/src/main/res/values-v27/styles.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file