I\'m using ActionBarCompat in my app, an I want to show one or two items in the action bar
I follwed the guide of google developers, but when I test it, the items are sh
I found the solution so I posted as Answer:
SOLUTION FOUND
In the xml of the menu, you have to put the new namespace, to make actionbarcompat work. So there are some options that need this spacename instead of "android". So the solutions is This:
Old Login menu:
New Login Menu (solution) (Look at how is caled "showAsAction")
Login.xml (MENU)
LoginActivity.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SLog.d(CLASS_NAME + " onCreate()");
setContentView(R.layout.activity_login);
actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
findViews();
buttons();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.login, menu);
return true;
}
Manifest