Recyclerview not call any Adapter method :onCreateViewHolder,onBindViewHolder,

前端 未结 8 1857
灰色年华
灰色年华 2020-12-01 08:54

my RecyclerView do not call onCreateViewHolder, onBindViewHolder, therefore, does not appear nothing in recyclerview. I put logs for debugging, and no log is shown. What can

8条回答
  •  离开以前
    2020-12-01 09:34

    If RecyclerView gets put into a ScrollView, then during measure step its height is unspecified (because ScrollView allows any height) and gets equal to minimum height (as per implementation) which is apparently zero.

    ref : android: RecyclerView inside a ScrollView

    Solution : - put views in row of RecyclerViews - Calculate the size of the list items and set the height of the ListView programmatically http://vardhan-justlikethat.blogspot.com/2014/04/android-listview-inside-scrollview.html

提交回复
热议问题