samedi 16 mai 2015

ImageView in toolbar before title

I'm using an android.support.v7.widget.Toolbar and I'd like to place an ImageView so that it will be before (to the left of) the title. Currently, it goes right after the title. Is it possible without placing my own TextView?

   <android.support.v7.widget.Toolbar xmlns:android="http://ift.tt/nIICcg"
                                   xmlns:local="http://ift.tt/GEGVYd"
                                   android:id="@+id/toolbar_with_photo"
                                   android:layout_width="match_parent"
                                   android:layout_height="wrap_content"
                                   android:minHeight="?attr/actionBarSize"
                                   android:background="?attr/colorPrimary"
                                   local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                                   local:popupTheme="@style/ThemeOverlay.AppCompat.Light" >
    <ImageView
            android:layout_width="65dp"
            android:layout_height="65dp"
            android:id="@+id/imageViewPhoto"/>

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

Aucun commentaire:

Enregistrer un commentaire