title: need to add a close button to a fragment or to close an pop up activity just to go back to the previous screen
body: <p>Hi I have a requirement that i need to add a close button to a pop menu or fragment , i know that i can just touch anywhere besides the pop menu to close or go back to the previous activity ,my question is there a code to close the fragment activity by adding a  button to it </p>
  
  <p>what should be my approach should i add a close button and add intent to move it to the previous activity or is there a code to the close the activity </p>
  
  <p>printf("%d\n", 42);  /* what was the
       question again? */</p>