I'm trying to add the share button on the action bar but the build fails because:
Error:(21) No resource identifier found for attribute 'actionProviderClass' in package '...'
My menu/detail.xml has:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item1.../>
<item2.../>
<item android:id="@+id/action_share"
android:icon="@android:drawable/ic_menu_share"
android:title="@string/action_share"
android:showAsAction="always"
app:actionProviderClass="android.support.v7.widget.ShareActionProvider"/>
</menu>
(This is probably irrelevant but the instructions say to make android:showAsAction be app:showAsAction but that gets underlined and it says "Should use android:showAsAction when not using the appcompat library")
My thanks!
0 comments:
Post a Comment