Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Change Status Bar Color in Android

$
0
0

@vinimendes3 wrote:

I'm trying to change my status bar color and it's not working.

I've tried with StatusBar directly from native cordova, and later I've tried with $cordovaStatusbar plugin.
Both cases I tested on my device (LG G3 - Android 5.0) and it's NOT WORK =(.

I tested on simulator (Genymotion) in versions above 5.0, and it's work.

Is this normal?

My currently code is, in app.run()

$ionicPlatform.ready(function() {

	// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
	// for form inputs)
	if (window.cordova && window.cordova.plugins.Keyboard) {
		cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
		cordova.plugins.Keyboard.disableScroll(true);
	}

	if (window.StatusBar) {
		// org.apache.cordova.statusbar required

		if (ionic.Platform.isAndroid()) {
			//StatusBar.backgroundColorByHexString("#60C7CC");
			$cordovaStatusbar.styleHex('#60C7CC');
		} else {
			StatusBar.styleLightContent();
		}
	}

});

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>