From 8e39231ad3286c62adb1625532194423578b642a Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 16 Mar 2015 11:14:04 -0700 Subject: [PATCH] Make the status bar translucent This CL lets Sky apps draw behind the Android status bar, better matching the material design spec. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1010493007 --- .../shell/org/domokit/sky/shell/SkyActivity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engine/src/flutter/shell/org/domokit/sky/shell/SkyActivity.java b/engine/src/flutter/shell/org/domokit/sky/shell/SkyActivity.java index b0eb9c0662..e37114d648 100644 --- a/engine/src/flutter/shell/org/domokit/sky/shell/SkyActivity.java +++ b/engine/src/flutter/shell/org/domokit/sky/shell/SkyActivity.java @@ -6,6 +6,8 @@ package org.domokit.sky.shell; import android.app.Activity; import android.os.Bundle; +import android.view.View; +import android.view.WindowManager; /** * Base class for activities that use Sky. @@ -19,6 +21,14 @@ public class SkyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + getWindow().addFlags( + WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + getWindow().setStatusBarColor(0x40000000); + getWindow().getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); + SkyMain.ensureInitialized(getApplicationContext()); mView = new PlatformView(this); setContentView(mView);