Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 08008200C37 for ; Mon, 27 Feb 2017 03:09:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 066BA160B6E; Mon, 27 Feb 2017 02:09:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 74159160B77 for ; Mon, 27 Feb 2017 03:09:28 +0100 (CET) Received: (qmail 77910 invoked by uid 500); 27 Feb 2017 02:09:27 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 77405 invoked by uid 99); 27 Feb 2017 02:09:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2017 02:09:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D9A2BDFCA1; Mon, 27 Feb 2017 02:09:26 +0000 (UTC) From: macdonst To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-plugin-statusbar pull request #77: CB-10879: (android) Enable overla... Content-Type: text/plain Message-Id: <20170227020926.D9A2BDFCA1@git1-us-west.apache.org> Date: Mon, 27 Feb 2017 02:09:26 +0000 (UTC) archived-at: Mon, 27 Feb 2017 02:09:29 -0000 Github user macdonst commented on a diff in the pull request: https://github.com/apache/cordova-plugin-statusbar/pull/77#discussion_r103127274 --- Diff: src/android/StatusBar.java --- @@ -164,4 +181,21 @@ private void setStatusBarBackgroundColor(final String colorPref) { } } } + + private void setStatusBarTransparent(final boolean transparent) { + if (Build.VERSION.SDK_INT >= 21) { + final Window window = cordova.getActivity().getWindow(); + if (transparent) { + window.getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); + window.setStatusBarColor(Color.TRANSPARENT); --- End diff -- This method was only introduced in API level 21 so you should use the same approach as `setStatusBarBackgroundColor` and call it via reflection. In fact you'd be better off refactoring `setStatusBarBackgroundColor` so you don't end up repeating a bunch of code. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org