Palette Image View Android

230 Views Asked by At

Hi I'm trying to implement android's palette. Is it possible to set the toolbar's background color using imageview if so how ? i've tried translating it to bitmap but it didnt work the app is a web browser and i wanted to change the toolbar's baxkground color making it a little like chrome using favicons.

Thanks

1

There are 1 best solutions below

0
On

You could just set the image as the background of your Toolbar:

<android.support.v7.widget.Toolbar
    android:id="@+id/yourToolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?attr/actionBarSize"
    android:background="@drawable/yourImage">

</android.support.v7.widget.Toolbar>