KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have made a completely new project. I have added items to the menu layout file. Those items do not show up on the action bar's right side. I remember that an icon with three dots shows up which opens up the menu. Here is my Activity public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ActionBar actionBar = getActionBar(); actionBar.setBackgroundDrawable(new ColorDrawable(Color.BLUE)); actionBar.show(); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } } And here is my main.xml <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_option1"/> <item android:id="@+id/action_settings34" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_option2"/> <item android:id="@+id/action_settings3" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_option3"/> </menu>
Tags (comma-separated)
Save Edits
Cancel