title: Show a Fragment all over activity/fragment with a button click
body: <p>i have an activity with a toolbar, a tablayout and a pager.
  So with the toolbar i have the name of the app and maybe i can add some button for navigation.</p>
  
  <p>With the tablayout i can click or just move the finger left or right to navigate throw my 3 fragment.</p>
  
  <p>In a fragment i put a button, and it purposes is to show a fragment over all my layout. So everything i said before will be all covered by this fragment.</p>
  
  <p>How can i realize that? I saw many videos and guide, but my button wont work. I dont even get any error and my app start well.
  While testing, if i click the button nothing happened. In the "run" doesnt show any information, like the button is empty.</p>
  
  <pre><code>    public void onClick(View v) {
      switch(v.getId()){
          case R.id.button2:
              FirebaseAuth.getInstance().signOut();
              startActivity(new Intent(v.getContext(), CheckActivity.class));
              getActivity().finish();
              break;
  
          case R.id.button3:
              EditProfileFragment editprofiele = new EditProfileFragment();
              getFragmentManager().beginTransaction().replace(R.id.MainAct, editprofiele).commit();
              break;
  
          default:
              break;
      }
  
  
  }
  </code></pre>
  
  <p>I have two button. The button2 is for disconnect and open a new activity.
  The button3 is for showing up my fragment. I tried any combination. Maybe not replace but add, and something else. But everything isnt working.</p>
  
  <p>In the activity that holds everythings i have already implements the listener to that fragment. any help?</p>