toolbar settings click event handler

I have a issue working with the default toolbar that comes with the navigationdrawer from androidStudio.

Every time i click on that icon my app crashes and i have a error saying the problem is on the listViewMenuItem a method that is outside of my scope.

What i need to know, is who handles the click on the actionSettings menu at the toolbar, i don't need to know the handler for the options, but for the icon.

I ask this because i can't figure out what is wrong on my code, since i tried almost everything and the icon doesn't display the menu at the top.

Here is my activity:

public class PlantFeed extends AppCompatActivity
        implements NavigationView.OnNavigationItemSelectedListener,PlantFeedAdapter.OnItemClickListener {

    //initialize fields

    String token;

    ArrayList<PlantPhotoUser> photos = new ArrayList<>();

    VolleyService mVolleyService;
    IResult mResultCallback = null;
    final String GETREQUEST = "GETCALL";

    String connectionTxt;

    String URL;

    String date;
    String lat;
    String lon;
    String alt;

    PlantFeedAdapter plantFeedAdapter;
    RecyclerView recyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTheme(R.style.AppTheme);
        setContentView(R.layout.activity_plant_feed);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        getSupportActionBar().setTitle("Novidades");

        connectionString connection = ((connectionString) getApplicationContext());
        connectionTxt = connection.getGlobalVarValue();

        URL = connectionTxt + "/fotos";


        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent i = new Intent(PlantFeed.this,CameraCapture.class);
                startActivity(i);
            }
        });

        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
        drawer.setDrawerListener(toggle);
        toggle.syncState();

        NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
        navigationView.setNavigationItemSelectedListener(this);

        recyclerView = (RecyclerView)findViewById(R.id.recycleView2);
        recyclerView.setHasFixedSize(true);

        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        plantFeedAdapter = new PlantFeedAdapter(getApplicationContext(), photos,PlantFeed.this);
        recyclerView.setAdapter(plantFeedAdapter);

        token = checkForToken();

        initVolleyCallback();

        mVolleyService = new VolleyService(mResultCallback,this);

        mVolleyService.getDataVolley(GETREQUEST,URL,token);

    }



    void initVolleyCallback(){
        mResultCallback = new IResult() {
            @Override
            public void notifySuccess(String requestType,JSONObject response) {
                Log.d("HELLL","hi1");
            }

            @Override
            public void notifySuccess(String requestType, JSONArray response) {
                PlantPhotoUser plantPhotoUser;
                Log.d("HELLLL","hi");
                for (int i=0; i < response.length(); i++) {
                    try {
                        JSONObject object = response.getJSONObject(i);
                        Log.d("objeto",object.toString());

                        int userId = object.getInt("userId");
                        Log.d("objeto",String.valueOf(userId));
                        String username = object.getJSONObject("user").getString("username");
                        Log.d("objeto",String.valueOf(username));
                        int plantId = object.getInt("plantId");
                        Log.d("objeto",String.valueOf(plantId));
                        String specie = object.getJSONObject("plant").getString("specie");
                        Log.d("objeto",String.valueOf(specie));

                        String path = object.getString("image");
                        Log.d("objeto",String.valueOf(path));
                        int fotoId = object.getInt("id");

                        if(object.getString("date") != null){
                            date = object.getString("date");
                        }

                        if(object.getString("lat") != null){
                            lat = object.getString("lat");
                        }

                        if(object.getString("lon") != null){
                            lon = object.getString("lon");
                        }

                        if(object.getString("altitude") != null){
                            alt = object.getString("altitude");
                        }

                        plantPhotoUser = new PlantPhotoUser(fotoId,plantId,userId,path,specie,date,lat,lon,alt,username);
                        photos.add(plantPhotoUser);


                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }

                plantFeedAdapter.notifyDataSetChanged();

            }

            @Override
            public void notifyError(String requestType,VolleyError error) {
                Log.d("FAIL",error.toString());
            }
        };
    }

    public String checkForToken() {
        SharedPreferences sharedPref = getSharedPreferences("user", MODE_PRIVATE);
        String tokenKey = getResources().getString(R.string.token);
        String token = sharedPref.getString(getString(R.string.token), tokenKey); // take the token
        return token;
    }

    @Override
    public void onBackPressed() {
        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        if (drawer.isDrawerOpen(GravityCompat.START)) {
            drawer.closeDrawer(GravityCompat.START);
        } else {
            super.onBackPressed();
        }
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.

        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }



        return super.onOptionsItemSelected(item);
    }

    @SuppressWarnings("StatementWithEmptyBody")
    @Override
    public boolean onNavigationItemSelected(MenuItem item) {
        // Handle navigation view item clicks here.
        int id = item.getItemId();

        if (id == R.id.nav_camera) {
            Intent i = new Intent(PlantFeed.this,CameraCapture.class);
            startActivity(i);
        } else if (id == R.id.nav_gallery) {
            Intent i = new Intent(PlantFeed.this,PlantFeed.class);
            startActivity(i);
        } else if (id == R.id.nav_slideshow) {
            Intent i = new Intent(PlantFeed.this,FamilyLibrary.class);
            startActivity(i);
        } else if (id == R.id.nav_manage) {

        } else if (id == R.id.nav_share) {

        }

        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        drawer.closeDrawer(GravityCompat.START);
        return true;
    }

the xml of my toolbar:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.afcosta.inesctec.pt.android.PlantFeed">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/emerald"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recycleView2"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" />

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:scaleType="center"
        android:layout_margin="@dimen/fab_margin"
        android:backgroundTint="#f1c40f"
        android:layout_marginRight="30dp"
        android:layout_marginBottom="30dp"
        android:src="@android:drawable/ic_menu_camera" />

    <include layout="@layout/content_plant_feed" />

</android.support.design.widget.CoordinatorLayout>

this is getting imported on the main activity:

?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">

    <include
        layout="@layout/app_bar_plant_feed"
        app:layout_widthPercent="100%"
        app:layout_heightPercent="8%"
        app:layout_marginTopPercent="0%"
        app:layout_marginLeftPercent="0%" />


    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:headerLayout="@layout/nav_header_plant_feed"
        app:menu="@menu/activity_plant_feed_drawer"
        android:background="@color/white"/>

</android.support.v4.widget.DrawerLayout>

i did some changes on my styles too, maybe there is the issue:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimaryDark">@color/nephritis</item>
        <item name="colorControlActivated">@color/emerald</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:actionOverflowButtonStyle">@style/MyActionButtonOverflow</item>
        <item name="android:spinnerStyle">@style/mySpinnerItemStyle</item>
    </style>


    <style name="MyActionButtonOverflow" parent="android:style/Widget.Holo.Light.ActionButton.Overflow">
        <item name="android:src">@drawable/ic_user</item>
        <item name="android:tint">@color/white</item>
    </style>
    <!-- Base application theme. -->
    <style name="AppTheme2" parent="Theme.AppCompat.Light">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/emerald</item>
        <item name="colorPrimaryDark">@color/nephritis</item>
        <item name="colorControlActivated">@color/emerald</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:actionBarStyle">@style/CustomActionBarStyle</item>
    </style>


    <style name="CustomActionBarStyle" parent="@style/Widget.AppCompat.Light.ActionBar">
        <item name="android:background">@color/emerald</item>
        <item name="android:titleTextStyle">@color/base</item>

        <item name="background">@color/emerald</item>
        <item name="titleTextStyle">@color/base</item>
    </style>

    <style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
        <item name="android:background">@color/emerald</item>
    </style>

    <style name="ToolBarStyle" parent="ToolBarStyle.Base" />

    <style name="ToolBarStyle.Base" parent="">
        <item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
        <item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
    </style>

    <style name="ToolBarStyle.Event" parent="ToolBarStyle">
        <item name="titleTextAppearance">@style/TextAppearance.Widget.Event.Toolbar.Title</item>
    </style>

    <style name="TextAppearance.Widget.Event.Toolbar.Title" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
        <!--Any text styling can be done here-->
        <item name="android:textStyle">normal</item>
        <item name="android:textSize">@dimen/specie_title</item>
    </style>


    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>

the icon on my toolbar is the userIcon, i need to know who handles the click so i can debug it and solve the issue maybe.

This is the error i get:

06-17 18:57:37.438 13992-13992/com.example.afcosta.inesctec.pt.android E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                         Process: com.example.afcosta.inesctec.pt.android, PID: 13992
                                                                                         java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
                                                                                             at android.support.v7.view.menu.ListMenuItemView.setTitle(ListMenuItemView.java:127)
                                                                                             at android.support.v7.view.menu.ListMenuItemView.initialize(ListMenuItemView.java:113)
                                                                                             at android.support.v7.view.menu.MenuAdapter.getView(MenuAdapter.java:100)
                                                                                             at android.support.v7.view.menu.MenuPopup.measureIndividualMenuWidth(MenuPopup.java:160)
                                                                                             at android.support.v7.view.menu.StandardMenuPopup.tryShow(StandardMenuPopup.java:153)
                                                                                             at android.support.v7.view.menu.StandardMenuPopup.show(StandardMenuPopup.java:187)
                                                                                             at android.support.v7.view.menu.MenuPopupHelper.showPopup(MenuPopupHelper.java:290)
                                                                                             at android.support.v7.view.menu.MenuPopupHelper.tryShow(MenuPopupHelper.java:175)
                                                                                             at android.support.v7.widget.ActionMenuPresenter$OpenOverflowRunnable.run(ActionMenuPresenter.java:803)
                                                                                             at android.os.Handler.handleCallback(Handler.java:751)
                                                                                             at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                             at android.os.Looper.loop(Looper.java:154)
                                                                                             at android.app.ActivityThread.main(ActivityThread.java:6119)
                                                                                             at java.lang.reflect.Method.invoke(Native Method)
                                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

thank you !