示例#1
0
 public void DefaultRefresh(List <W> dataList, Func <W, int, string> getPrefab)
 {
     _curDataList = dataList;
     _getPrefab   = getPrefab;
     if (!m_IsInit)
     {
         m_IsInit = true;
         m_LoopGroup.InitListView(dataList.Count, OnGetItemByIndex);
     }
     else
     {
         m_LoopGroup.ResetListView();
         m_LoopGroup.SetListItemCount(_curDataList.Count, false);
     }
 }
        void OnAddItemBtnClicked()
        {
            if (mLoopListView.ItemTotalCount < 0)
            {
                return;
            }
            int count = 0;

            if (int.TryParse(mAddItemInput.text, out count) == false)
            {
                return;
            }
            count = mLoopListView.ItemTotalCount + count;
            if (count < 0 || count > DataSourceMgr.Get.TotalItemCount)
            {
                return;
            }
            mLoopListView.SetListItemCount(count, false);
        }
示例#3
0
 public override void RefreshView()
 {
     if (secretsData.Count > 0)
     {
         emptyImage.gameObject.SetActive(false);
     }
     else
     {
         emptyImage.gameObject.SetActive(true);
     }
     ScrollView.SetListItemCount(secretsData.Count);
 }