I want my spinner to be next to my menu in the toolbar (to the left of the menu), but currently the spinner appear below the menu. Do i have to add it somehow inside the o
Add menu Item
Java
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.android_action_bar_spinner_menu, menu);
MenuItem item = menu.findItem(R.id.spinner);
Spinner spinner = (Spinner) item.getActionView();
ArrayAdapter adapter = ArrayAdapter.createFromResource(this,
R.array.spinner_list_item_array, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
return true;
}
or