I am new to android. I know this question have been asked before but, i am still confuse . What this method does when returning them inside my onCreateOptionMenu() and onOptionI
Ok. I got you question:
Que 1 :
What this method does when returning them inside my onCreateOptionMenu() and onOptionItemSelected()
Ans :
onCreateOptionMenu() used for inflate menu in action bar.
onOptionItemSelected() used for capture onclick of that menus
Que 2 :
if i return true or false
Ans :
ref !!! you should return true if you have inflated menu in that file or your defined menu is clicked. else u should return false. so compiler will find for men or menu item in other page.
eg. you have one activity and two fragment, then if menu or menu item not find in activity then compiler will find it in fragment. if you return true then no further search.
Que 3 :
why to use super ?
Ans :
so compiler get to know that in this file there is no user defined menu or item value.