title: best way to show the three dot menu item in action bar without using "a hack" method
body: <p>I am a little confused. I want to show the remaining items of the action bar inside the three dot item. But i always lose it when the number of items increases !     after googling a little, i found this "useful" method : <a href="https://stackoverflow.com/questions/15492791/how-do-i-show-overflow-menu-items-to-action-bar-in-android">ASMUIRTI ANSWER</a></p>
  
  <pre><code>private void getOverflowMenu() {
      try {
         ViewConfiguration config = ViewConfiguration.get(this);
         Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
         if(menuKeyField != null) {
             menuKeyField.setAccessible(true);
             menuKeyField.setBoolean(config, false);
         }
     } catch (Exception e) {
         e.printStackTrace();
     }
   }
  </code></pre>
  
  <p>I tested it and that work as i want. Unfortunately, triing to better understand what does this method do, i found that it's <strong><a href="https://stackoverflow.com/questions/9739498/android-action-bar-not-showing-overflow">an awful hack that breaks consistency with the rest of the apps on the platform</a></strong> (adamp's comment)</p>
  
  <p>Can somebody tell me why it's a hack, and what is the best solution ?</p>