mardi 16 août 2016

Display menu icon and text with actionViewClass=“CheckBox”

All - I'm using the AppCompat library for my application, and I'm trying to display a menu item with actionViewClass="android.support.v7.widget.AppCompatCheckBox"

I'd like the title and icon to display on the bar, so I'm using the following code:

<item
    android:id="@+id/selectall"
    android:title="Select All"
    android:checkable="true"
    android:checked="true"
    app:actionViewClass="android.support.v7.widget.AppCompatCheckBox"
    app:showAsAction="ifRoom|withText"/>

but the title isn't displaying. Any ideas how to get the title to display?




Aucun commentaire:

Enregistrer un commentaire