title: Change Menu Items Order programmatically Android Java
body: <p>Basically I have an android popup menu, when any menu item is clicked, it should reshuffle the order of the menu items</p>
  <pre><code>&lt;menu xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      &lt;item android:id=&quot;@+id/yellow&quot;
          android:title=&quot;Yellow&quot;/&gt;
      &lt;item android:id=&quot;@+id/red&quot;
          android:title=&quot;Red&quot;/&gt;
      &lt;item android:id=&quot;@+id/blue&quot;
          android:title=&quot;Blue&quot;/&gt;
      &lt;item android:id=&quot;@+id/green&quot;
          android:title=&quot;Green&quot;/&gt;
  &lt;/menu&gt;
  </code></pre>