codepath / android_guides

Extensive Open-Source Guides for Android Developers
guides.codepath.com
MIT License
28.31k stars 6.35k forks source link

BottomNavigationView: cannot set actionLayout #330

Open SWRHARD opened 6 years ago

SWRHARD commented 6 years ago

Hi, i tried to add custom layout as menu item for bottom navigation view, but it isn't showing, i have this:

<item android:id="@+id/action_in_progress" android:enabled="true" android:actionLayout="@layout/in_progress_layout" android:title="@string/in_progress_screen_title" app:showAsAction="ifRoom" />

I found one desicion : inflate this layout programmatically and it's working well, but i cant understand how to set title for this, because i have message: "BottomNavigationItemView.setTitle can only be called from within the same library group (groupId=com.android.support). This API has been flagged with a restriction that has not been met."

Thanks)

ShrutiGlocalView commented 5 years ago

i too faced this issue