Context
There seems to be a misunderstanding about showAsAction this menu setting. The information I find in many stackoverflow answers always seems incomplete. So here is an attempt to change that.
Three points | overflow | options menu
It is not possible to control whether the menu for dragging three points is displayed on your action screen or not in the code.
Well, you can make it not show without having an options menu. And frankly, you can hack this, more information in How to get to use the overflow menu on devices using the menu button
Points that are displayed or independent of the device you are testing,. Devices with a menu button DO NOT show the three dots icon on the action bar, as users can use the menu button on the device.

Devices that do not have this option menu button (for example, communication devices starting with Galaxy) do not have an alternative to launch this option menu. Running the same application on these devices displays three point overflow options in the action menu.

What can you control
There is a showAsAction parameter in the xml file of the menu file, which you can use to to control how this single menu is displayed in the action bar.
According to the official resource menu resources , the following options:
android:showAsAction=["ifRoom" | "never" | "withText" | "always" | "collapseActionView"]
The ifRoom flag ifRoom shows an option if there is enough space. This should be your first choice in most cases. This, however, condenses the title in the action bar (see. Vertical screenshot).
The never flag will always have this option in the overflow menu and will never be directly in the action bar.
Using the always flag is discouraged, as it will cause the parameter to always be displayed in acitonbar. Even when working on a very small screen. This can make the title completely invisible.
As you could now, the options menu can have both the android:title property and the android:icon property. You can use the withText flag with always or ifRoom (use the channel | between them) to make the text of the element appear next to the icon when rendering to the action bar.
collapseActionView is only supported with API level 14 , so let me ignore this.
Screenshot showing the following code snippet in action on a device in portrait mode:

And another screenshot, in which there is more space on the action bar due to landscape mode:

Android Documentation
The best document for developing this action bar would be an action guide . If you are looking more for development guidelines, follow this link . The link to the resource was indicated earlier. For the menu as a whole, check this out .
Code snippet
The code is for reference only, as this part seems correct in most of the answers. A more complete example can be found at https://github.com/AndroidExamples/fragment-navigation
The contents of the file /res/menu/main.xml :
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="be.hcpl.android.example.MainActivity" > <item android:id="@+id/action_one" android:title="@string/action_one" android:orderInCategory="100" app:showAsAction="never" /> <item android:id="@+id/action_two" android:title="@string/action_two" android:orderInCategory="200" app:showAsAction="ifRoom" /> <item android:id="@+id/action_three" android:title="@string/action_three" android:orderInCategory="300" app:showAsAction="always" /> <item android:id="@+id/action_four" android:icon="@android:drawable/ic_menu_directions" android:title="@string/action_four" android:orderInCategory="400" app:showAsAction="withText|always" /> <item android:id="@+id/action_five" android:icon="@android:drawable/ic_menu_info_details" android:title="@string/action_five" android:orderInCategory="500" app:showAsAction="always" /> </menu>
Some related answers
- Action buttons not showing in action bar?
- Action bar not shown with AppCompat
- Android - want to show 3-point menu on ICS