Call of findViewById in Fragment to find a button returns null

前端 未结 4 996
遥遥无期
遥遥无期 2021-01-19 00:54

I´m new to android development and I´m trying to write a small, simple Application. This application should do nothing more than reading the text from 2 EditTexts and when

4条回答
  •  后悔当初
    2021-01-19 01:17

    Your button is inside activity_main.xml, but you're inflating R.layout.headline_view:

    this.inflatedView = inflater.inflate(R.layout.headline_view, container, false);
    

提交回复
热议问题