fragment manager in android

Java
       Intent intent = new Intent(v.getContext(), Addbill.class);
        v.getContext().startActivity(intent);
        getActivity().finish();
Source

Also in Java: