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

v0.5.8 don't show loadingmore view at the first time #387

Open julist213 opened 8 years ago

julist213 commented 8 years ago

first load -> var enabled_custom_load_more_view =false in UltimateViewAdapter and method internalExecuteLoadingView() exec at the time pull to bottom ,so adapter could't getFooterView at the first time ?what's wrong.

jjhesk commented 8 years ago

it was set to be this way. if you like to open it, you could try to override in at the oncreate part in the adapter.

julist213 commented 8 years ago

@jjhesk i solved problem by dynamic changing the boolean value of var enabled_custom_load_more_view .by the way why ,in DataObserver method updateHelperDisplays() do mEmpty.setVisibility(mEmptyView == null ? View.VISIBLE : View.GONE) , rather than mEmpty.setVisibility(mEmptyView == null ? View.GONE: View.VISIBLE) ?thx

jjhesk commented 8 years ago

@julist213 yes you can certainly do so. there is a better way if you would looking at the sample app. try to learn from "debug first page cancel load more". You may download from here

julist213 commented 8 years ago

@jjhesk that demo can handle disable and reenable loadmore but it's no use to show loadmore view at first time ,even every loadmore action loadmore view can't display.

passerbyABC123 commented 8 years ago

@julist213 Facing the same problem here. Might you elaborate more on how you solved that?

julist213 commented 8 years ago

@passerbyABC123 i do in my adapter like: public ...Adapter(){ enabled_custom_load_more_view=true;//for first time showing? } //open this method to dynamic change the boolean value ? public void setLoadMoreEnable(boolean enable){ enabled_custom_load_more_view=enable; } it's work for me ,can help you ?

jjhesk commented 8 years ago

enabled_custom_load_more_view is not for the first time showing and setLoadMoreEnable is an internal control method.