title: Android app preferences page doesn't show toolbar
body: <p>I'm trying to add a preferences page to my Android app.</p>
  
  <p>I've added an <code>&lt;item&gt;</code> to my <code>&lt;menu&gt;</code> that gets "inflated" in <code>onCreateOptionsMenu</code> to make it appear in the <code>&lt;androidx.appcompat.widget.Toolbar&gt;</code> in <code>main_activity.xml</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/zsLtJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zsLtJ.png" alt="enter image description here"></a></p>
  
  <p><strong>(1)</strong> it shows up as the cog icon that I added, not as the three dots -- why? How do you get the three dots?</p>
  
  <p>When I go to the settings page my toolbar disappears, but in all the examples the toolbar shows the title and a back button.
  I have edited the <code>manifest.xml</code> to add the <code>android:parentActivityName=".MainActivity"</code> stuff.</p>
  
  <p><strong>(2)</strong> why does my toolbar disappear?</p>
  
  <p>I've defined a list of values another list of labels to use in a <code>&lt;ListPreference&gt;</code> but it doesn't work. </p>
  
  <pre><code>    &lt;ListPreference
          android:dialogTitle="Select units"
          android:entries="@array/units_names"
          android:entryValues="@array/units_values"
          android:key="list"
          android:summary="Click to show a list to choose from"
          android:title="Units" /&gt;
  </code></pre>
  
  <pre><code>&lt;resources&gt;
      &lt;string-array name="units_values"&gt;
          &lt;item&gt;miles&lt;/item&gt;
          &lt;item&gt;km&lt;/item&gt;
      &lt;/string-array&gt;
      &lt;string-array name="units_names"&gt;
          &lt;item&gt;miles&lt;/item&gt;
          &lt;item&gt;km&lt;/item&gt;
      &lt;/string-array&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>3</strong> Why isn't this working?! I really can't see what I've got wrong.</p>
  
  <p><a href="https://i.stack.imgur.com/qLw3b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qLw3b.png" alt="enter image description here"></a></p>