Reputation: 915
How can I start new activity on click of the Android toolbar's overflow button click. I don't want the dropdown to appear since I only have one item, rather directly change the activity.
Upvotes: 0
Views: 205
Reputation: 1736
Add this line in your menu_item.xml file:
app:showAsAction="always"
menu_item.xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_github"
android:title="@string/title_github"
android:icon="@drawable/ic_github"
app:showAsAction="always" />
</menu>
Upvotes: 1