Esempio n. 1
0
        /// <summary>
        /// 根据地点检索
        /// </summary>
        /// <param name="_place"></param>
        public void JumpByLocation(string _place)
        {
            m_Searchplace = _place;
            PageItem tmp_Item = null;
            //本地检索
            int index = 0;

            tmp_Item = DatasourceMgr.Instance.GetItemDataByPlace(_place, out index);
            //Debug.Log(index + " id:" + tmp_Item.id);
            if (tmp_Item != null)
            {
                m_Looplistview.MovePanelToItemIndex(index, 0);//单元数据id从1开始 数据存储索引从0开始,这里是用索引跳转
            }
            else //本地没有 网络检索
            {
                NetHttp.Instance.GetSerchInfo(_place);
            }
        }
Esempio n. 2
0
        void OnJumpBtnClicked()
        {
            int itemIndex = 0;

            if (int.TryParse(mScrollToInput.text, out itemIndex) == false)
            {
                return;
            }
            itemIndex -= 2;
            if (itemIndex < 0)
            {
                itemIndex = 0;
            }
            mLoopListView.MovePanelToItemIndex(itemIndex, 0);
            mLoopListView.FinishSnapImmediately();
        }
Esempio n. 3
0
 public void MoveToIndex(int index, float offset = 0)
 {
     m_LoopGroup.MovePanelToItemIndex(index, offset);
 }