Handled click event for the action bar buttons (P and N)