Button click listener not working in fragment

So this is the code in my fragment but the button doesn’t do anything when I click it.

class CreateJobFragment : Fragment() {
    // TODO: Rename and change types of parameters
    private var param1: String? = null
    private var param2: String? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        arguments?.let {
            param1 = it.getString(ARG_PARAM1)
            param2 = it.getString(ARG_PARAM2)

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?

    ): View? {
        // Inflate the layout for this fragment
        val view: View = inflater!!.inflate(R.layout.fragment_create_job, container, false)
        view.create_btn.setOnClickListener {
            Log.d("console", "Button pressed")
        return inflater.inflate(R.layout.fragment_create_job, container, false)

    companion object {
        fun newInstance(param1: String, param2: String) =
            CreateJobFragment().apply {
                arguments = Bundle().apply {
                    putString(ARG_PARAM1, param1)
                    putString(ARG_PARAM2, param2)

Make sure you see debug logs. Or use Log.i() instead.

Your onCreateView() is inflating the view, setting the click listener, and then inflating a new view and returning that. So the view with the click listener attached is never used.