title: Menu in not showing up in Fragment
body: <p><strong>I make fragment and i want to show menu for click to post. but menu not show. i don't know problem at not show. now i wanna show menu for the next step program pls help me.</strong>    </p>
  
  <pre><code>    public class FragmentViewPost extends Fragment {
  
      public static FragmentViewPost newInstance() {
          FragmentViewPost fragment = new FragmentViewPost();
          return fragment;
      }
  
  
      public FragmentViewPost() {
          // Required empty public constructor
      }
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          setHasOptionsMenu(true);
          View view = inflater.inflate(R.layout.fragment_fragment_view_post, container, false);
          return view;
      }
  
      private RecyclerView mBlogList;
      private DatabaseReference mDatabase;
      private FirebaseAuth mAuth;
      private FirebaseAuth.AuthStateListener mAuthListener;
  
      @Override
      public void onViewCreated(View view, Bundle savedInstanceState) {
          mAuth = FirebaseAuth.getInstance();
          mAuthListener = new FirebaseAuth.AuthStateListener() {
              @Override
              public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
  
                  if(firebaseAuth.getCurrentUser() == null){
  
  
                      startActivity();
  
                  }
              }
          };
  
          mDatabase = FirebaseDatabase.getInstance().getReference().child("Blog");
          mBlogList = (RecyclerView) view.findViewById(R.id.blog_list_fragment);
          mBlogList.setHasFixedSize(true);
          mBlogList.setLayoutManager(new LinearLayoutManager(getContext()));
  
      }
  
      private void startActivity() {
  
          Intent loginIntent = new Intent(getActivity(),PageLogin.class);
          loginIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          startActivity(loginIntent);
  
      }
  
  
      @Override
      public void onStart() {
          super.onStart();
  
          mAuth.addAuthStateListener(mAuthListener);
  
          FirebaseRecyclerAdapter&lt;Blog, BlogViewHolder&gt; firebaseRecyclerAdapter = new FirebaseRecyclerAdapter&lt;Blog, BlogViewHolder&gt;(
  
                  Blog.class, R.layout.blog_row, BlogViewHolder.class, mDatabase
  
          ) {
              @Override
              protected void populateViewHolder(BlogViewHolder viewHolder, Blog model, int position) {
  
                  viewHolder.setTitle(model.getTitle());
                  viewHolder.setDesc(model.getDesc());
                  viewHolder.setImage(getActivity(), model.getImage());
                  viewHolder.setUsername(model.getUsername());
  
              }
          };
  
          mBlogList.setAdapter(firebaseRecyclerAdapter);
      }
  
  
  
      public static class BlogViewHolder extends RecyclerView.ViewHolder{
  
          View mView;
  
          public BlogViewHolder(View itemView) {
              super(itemView);
  
              mView = itemView;
          }
  
          public void setTitle(String title){
  
              TextView post_title = (TextView) mView.findViewById(R.id.post_title);
              post_title.setText(title);
  
          }
  
          public void setDesc(String desc){
  
              TextView post_desc = (TextView) mView.findViewById(R.id.post_desc);
              post_desc.setText(desc);
  
          }
  
          public void setImage(Context ctx, String image){
  
              ImageView post_image = (ImageView) mView.findViewById(R.id.post_image);
              Picasso.with(ctx).load(image).into(post_image);
  
          }
  
          public void setUsername(String username){
  
              TextView post_username = (TextView) mView.findViewById(R.id.post_username);
              post_username.setText(username);
  
          }
      }
  
      @Override
      public void onCreate(@Nullable Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setHasOptionsMenu(true);
      }
  
      @Override
      public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
  //        super.onCreateOptionsMenu(menu,inflater);
          inflater.inflate(R.menu.menu_post, menu);
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
  
          if(item.getItemId() == R.id.action_add){
  
              goToAttract();
  
  //        switch (item.getItemId()) {
  //            case R.id.action_add:
  //                // Not implemented here
  //                Log.d("=============&gt;&gt;&gt;","search1");
  //                return false;
  //            case R.id.action_adduser:
  //                Log.d("=============&gt;&gt;&gt;","scan1");
  //                return true;
  //            default:
  //                break;
  
          }
  
          return super.onOptionsItemSelected(item);
  
  //        return false;
      }
  
      private void goToAttract() {
  
          Intent intent = new Intent(getActivity(), Post.class);
          startActivity(intent);
  
      }
  </code></pre>
  
  <p>and xml code :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"&gt;
  
      &lt;item android:id="@+id/action_add"
          android:icon="@mipmap/ic_add_white_24dp"
          android:title="Post"
          app:showAsAction="always"/&gt;
  
  
  
  &lt;/menu&gt;
  </code></pre>
  
  <p><strong>Thank you for help me :)</strong></p>