Cassim Jaffer
Cassim Jaffer

Reputation: 3

Changing the android titlebars which shows network bars, battery life and other things

image 1`how can i make the color of the titleBar which displays network, battery life level and many other things on android to have the same color as the menuBar or ToolBar

import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls.Material 2.12



ApplicationWindow {

    id:root
    visible: true
    width: 350
    height: 550
    color: toolbar.color
   

    header: ToolBar {
        id: toolbar
        background: Rectangle {
        id: bakcground
        color: "lightCyan"
    }
}

`

Upvotes: 0

Views: 38

Answers (1)

Yatik
Yatik

Reputation: 86

You can use the window property to access the window object, and then call the setStatusBarColor() method on it.

window.statusBarColor = ContextCompat.getColor(this, R.color.colorName)

Upvotes: 0

Related Questions