踩過的一些坑。

     java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

這個錯誤在我編寫RecyclerView填充佈局時出現的,View的重複繪製,錯誤代碼如下
   View view = inflater.inflate(R.layout.item_gridrecycler, parent);

少了一個參數,變爲2個參數的方法。

問題參考:http://blog.csdn.net/u012702547/article/details/52628453

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章