private void UpdateLoadingTip(LoopListViewItem2 item) { if (Object.op_Equality((Object)item, (Object)null)) { return; } ListItem11 component = (ListItem11)((Component)item).GetComponent <ListItem11>(); if (Object.op_Equality((Object)component, (Object)null)) { return; } if (this.mLoadingTipStatus == LoadingTipStatus.None) { component.mText.set_text("Click to Load More"); component.mWaitingIcon.SetActive(false); } else { if (this.mLoadingTipStatus != LoadingTipStatus.WaitLoad) { return; } component.mWaitingIcon.SetActive(true); component.mText.set_text("Loading ..."); } }
void UpdateLoadingTip(LoopListViewItem2 item) { if (item == null) { return; } ListItem11 itemScript0 = item.GetComponent <ListItem11>(); if (itemScript0 == null) { return; } if (mLoadingTipStatus == LoadingTipStatus.None) { itemScript0.mText.text = "Click to Load More"; itemScript0.mWaitingIcon.SetActive(false); } else if (mLoadingTipStatus == LoadingTipStatus.WaitLoad) { itemScript0.mWaitingIcon.SetActive(true); itemScript0.mText.text = "Loading ..."; } }
LoopListViewItem2 OnGetItemByIndex(LoopListView2 listView, int index) { if (index < 0) { return(null); } LoopListViewItem2 item = null; if (index == DataSourceMgr.Get.TotalItemCount) { item = listView.NewListViewItem("ItemPrefab0"); if (item.IsInitHandlerCalled == false) { item.IsInitHandlerCalled = true; ListItem11 itemScript0 = item.GetComponent <ListItem11>(); itemScript0.mRootButton.onClick.AddListener(OnLoadMoreBtnClicked); } UpdateLoadingTip(item); return(item); } ItemData itemData = DataSourceMgr.Get.GetItemDataByIndex(index); if (itemData == null) { return(null); } item = listView.NewListViewItem("ItemPrefab1"); ListItem2 itemScript = item.GetComponent <ListItem2>(); if (item.IsInitHandlerCalled == false) { item.IsInitHandlerCalled = true; itemScript.Init(); } itemScript.SetItemData(itemData, index); return(item); }