Check out example codes for "android toolbar with menus". It will help you in understanding the concepts better.

Code Example 1

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.main_menu, menu);
    return true;
}

Learn ReactJs, React Native from akashmittal.com