Content view not yet created

前端 未结 3 1414
小蘑菇
小蘑菇 2021-02-07 14:51

I am trying to retrieve the data from mysql and sort it based on the category tab. My application crash when i open the activity with content view not yet created. May I know wh

3条回答
  •  天涯浪人
    2021-02-07 15:05

    You can avoid crash by using check

    if(this.isAdded())   
    

    if you debug that part BooksFragment.getListView int the moment of exception - you will notice it's not exist.

提交回复
热议问题