cymcsg / UltimateRecyclerView

A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.
Apache License 2.0
7.22k stars 1.43k forks source link

setNormalHeader or setParallaxHeader(view) the header did not appear #355

Closed lkwjohn closed 8 years ago

lkwjohn commented 8 years ago
View headerView = LayoutInflater.from(context).inflate(R.layout.header, ultimateRecyclerView.mRecyclerView, false);
ultimateRecyclerView.setNormalHeader(headerView);

Used this version of the library: maven { url "http://dl.bintray.com/jjhesk/maven" } compile 'com.hkm.slidingmenulib:libmenu:0.4.7'

lkwjohn commented 8 years ago

the issue is similar to #231. It seems like it's not fixed.

lkwjohn commented 8 years ago

Hi,

managed to resolved it after looking at the setAdapterInternal which i realise that the mAdapter.setCustomHeaderView(mHeader); is only called once after user have set the adapter. Thus, i shifted the set header before setAdapter and that work as compare to the version of compile 'com.marshalchen.ultimaterecyclerview:library:0.3.11' .

jjhesk commented 8 years ago

right. set adapter is the last step to setup the recycler view.