How to make the three dots appear in the Android toolbar
<p>I am new in Android applications development, and I am trying to develop an application in UI I added a toolbar but In don't know why the three dots in  the right side of the toolbar, it is necessary for me because I want to add a logout button there.</p>

<p><a href="https://i.stack.imgur.com/bv8JI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bv8JI.jpg" alt="enter image description here"></a></p>

<p>here is the toolbar layout:</p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="wrap_content"
    android:background="#000"&gt;

&lt;/android.support.v7.widget.Toolbar&gt;
</code></pre>

<p>And here is where i add the toolbar inside the activity class:</p>

<pre><code> toolbar= (Toolbar) findViewById(R.id.app_bar);
    setSupportActionBar(toolbar);
    toolbar.setTitle(R.string.app_name);
    toolbar.setTitleTextColor(getResources().getColor(R.color.com_facebook_button_background_color_focused));
</code></pre>

<p>and this is my menu.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;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=".HomeActivity"&gt;


    &lt;item android:id="@+id/action_settings"

        android:title="Settings"
        android:orderInCategory="100"
        app:showAsAction="always"
        android:icon="@drawable/icon"
        /&gt;

    &lt;item
        android:id="@+id/action_search"
        android:title="Search"&gt;
        &lt;/item&gt;
&lt;/menu&gt;
</code></pre>

<p>And what is weird is that in the android studio preview the three dots are shown:</p>

<p><a href="https://i.stack.imgur.com/ecijE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ecijE.jpg" alt="enter image description here"></a></p>

<p>what I am doing wrong ?</p>