Notification Bar Assume app background color using Delphi

2

How to make the notification bar assume a predetermined color such as whatsup, gmail, etc.

I use the Delphi Firemonkey programming IDE.

In my apps the bar always takes on the color black, follow the example.

    
asked by anonymous 27.12.2015 / 14:36

1 answer

2

Following documentation , you need to change the colorPrimaryDark there are several ways to do it, you can either create your own theme or modify the existing one, you can implement it in XML or self-creation of the form.

Here are some examples:

values / themes.xml:

<style name="Theme.MyTheme" parent="Theme.AppCompat.Light">
    <!-- Here we setting appcompat’s actionBarStyle -->
    <item name="actionBarStyle">@style/MyActionBarStyle</item>

    <!-- ...and here we setting appcompat’s color theming attrs -->
    <item name="colorPrimary">@color/my_awesome_red</item>
    <item name="colorPrimaryDark">@color/my_awesome_darker_red</item>

    <!-- The rest of your attributes -->
</style>

or Layout

<android.support.v7.widget.Toolbar
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?attr/colorPrimaryDark"/>

Here's a good study material .

    
27.12.2015 / 15:00