In the same activity, I want to place some options in the optionsMenu and some on the ActionBarActivity. Should I create a separate xml file for the options to be placed in the optionsMenu and another xml file for those I want to place them on the ActionBar?
OR I have to create a single xml file for both? And in either cases, what will distinguish the options to be placed on the ActionBar than the others to be in the optionsmenu?
Do you mean the action bar and its overflow area (i.e. the "three dots")?
You need to create a single xml file with all the menu options, and then control this with the
android:showAsActionattribute on each one. For example, if you setifRoomthen it will be included in the action bar (provided there is enough space), whileneverwill put the item in the overflow menu.See the documentation here.