ResetPosition() приватный Метод

private ResetPosition ( ) : void
Результат void
Пример #1
0
    public override void OnShow()
    {
        bLogout = false;
        progress.gameObject.SetActive(true);
        uiScrollView.ResetPosition();
        textFullname.text = "";
        textMail.text     = "";
        textUsername.text = "";
        textCoin.text     = "";
        textTicket.text   = "";
        textReferal.text  = "";

        uiScrollView.gameObject.SetActive(false);
        uiScrollView.gameObject.SetActive(true);
        uiScrollView.ResetPosition();
        Hashtable data = new Hashtable();

        if (!string.IsNullOrEmpty(PlayerPrefs.GetString(PlayerPrefHandler.keyToken)))
        {
            data.Add("username", PlayerPrefs.GetString(PlayerPrefHandler.keyUserName));
            data.Add("token", PlayerPrefs.GetString(PlayerPrefHandler.keyToken));

            try
            {
                GemuAPI.GetUser(data);
            }
            catch (GemuAPI_Exception exc)
            {
                Debug.LogError(exc.Message);
            }
        }
    }
Пример #2
0
 private void LateUpdate()
 {
     //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
     if (isUpdateTween && scroll != null && grid != null && tw != null && !isFinished)
     {
         if (tw.tweenFactor < 1f)
         {
             float tweenFactor = tw.tweenFactor;
             grid.cellHeight = (float)itemHeight * tweenFactor;
         }
         else
         {
             grid.cellHeight = (float)itemHeight;
             isFinished      = true;
             isUpdateTween   = false;
         }
         scroll.ResetPosition();
         scroll.MoveRelative(new Vector3(0f, grid.cellHeight * (float)selectIndex));
         grid.Reposition();
         if (isFinished)
         {
             ((UIRect)grid.GetComponent <UIWidget>()).SetAnchor(null);
         }
     }
 }
Пример #3
0
    void Awake()
    {
        UIEventListener.Get(btnClose.gameObject).onClick       = onClickClose;
        UIEventListener.Get(btnPutOn.gameObject).onClick       = onClickPutOn;
        UIEventListener.Get(btnPutOff.gameObject).onClick      = onClickPutOff;
        UIEventListener.Get(btnBreak.gameObject).onClick       = onClickBreak;
        UIEventListener.Get(btnInteractive.gameObject).onPress = onPressInteractive;

        UIEventListener.Get(btnInstantBuy.gameObject).onClick = onClickInstantBuy;

        UIEventListener.Get(btnPhysicOrMagic.gameObject).onClick = onIcon1;
        UIEventListener.Get(btnTargetingType.gameObject).onClick = onIcon2;
        UIEventListener.Get(btnRange.gameObject).onClick         = onIcon3;

        UIEventListener.Get(btnReinfoce.gameObject).onClick = onClickReinforce;
        UIEventListener.Get(btnCompose.gameObject).onClick  = onClickCompose;

        UIEventListener.Get(btnEvolution.gameObject).onClick = onClickEvolution;

        UIEventListener.Get(btnReforge.gameObject).onClick = onClickReforge;


        UIEventListener.Get(btnPlayAttack.gameObject).onClick   = onClickPlayAttackAni;
        UIEventListener.Get(btnPlayDeadAni.gameObject).onClick  = onClickPlayDeadAni;
        UIEventListener.Get(btnPlaySkillAni.gameObject).onClick = onClickPlaySkillAni;


        UIEventListener.Get(tabPassiveInfo[0].gameObject).onClick = onClickPassive1;
        UIEventListener.Get(tabPassiveInfo[1].gameObject).onClick = onClickPassive2;
        UIEventListener.Get(tabPassiveInfo[2].gameObject).onClick = onClickPassive3;


        scrollView.ResetPosition();
    }
Пример #4
0
        public void onClickSlot(GameObject go)
        {
            if (m_RuneSlotInfo == null)
            {
                return;
            }
            m_RuneSlotInfo.sprite.spriteName = "";
            AudioManager.Instance.PlatUnloadRuneAudio();

            var oneRuneInfo = MarketRuneListModel.Instance.GetOneRuneInfo(m_RuneSlotInfo.runeID);

            LoadOneRune(m_RuneSlotInfo.runeID, oneRuneInfo.num);
            if (oneRuneInfo.num == 1)
            {
                m_BagGrid.Reposition();
                m_BagScroll.ResetPosition();
            }

            m_RuneSlotInfo.sprite.gameObject.SetActive(false);

            ClearFreshSlot();

            m_RuneSlotInfo      = null;
            m_WashBtn.isEnabled = false;
        }
Пример #5
0
    void AddItems()
    {
        for (int i = 0; i < mInitItemNum; ++i)
        {
            for (int j = 0; j < mItemPrefab.Length; ++j)
            {
                GameObject go = GameObject.Instantiate(mItemPrefab[j]) as GameObject;
                go.transform.parent        = mContainerTrans;
                go.transform.localPosition = new Vector3(0, 0, 0);
                go.transform.localScale    = new Vector3(1, 1, 1);
                mItemList.Add(go);
            }
        }
        switch (mTestType)
        {
        case GRID_OR_TABLE.TEST_TABLE:
            mTable.Reposition();
            break;

        case GRID_OR_TABLE.TEST_GRID:
            mGrid.Reposition();
            break;

        default: break;
        }
        mScrollView.ResetPosition();
    }
Пример #6
0
    public void ResultRestList(EmailView v)
    {
        EmailData.EmailType type = v.data.type;
        if (v != null)
        {
            switch (type)
            {
            case EmailData.EmailType.ReadDel:
                v.data.isRead = false;
                if (v.data.isRevice == false)
                {
                    mailNum--;
                    Destroy(v.gameObject);
                    viewList.Remove(v);
                }
                break;

            case EmailData.EmailType.Read:
                v.data.isRead = false;
                if (v.data.isRevice == false)
                {
                    v.SetReadState(false);
                }
                break;
            }
        }
        if (grid != null)
        {
            grid.Reposition();
            scroll.ResetPosition();
            grid.repositionNow = true;
        }
        SetInfo();
    }
Пример #7
0
    /// <summary>
    /// 생성한 길드멤버 리스트를 정렬한다.
    /// </summary>
    private void SortMemberList()
    {
        // 정렬변경 -> 1. 멤버상태(길드장->부길드장->길드원으로 정렬) -> 2. 오늘 로그인했나 -> 3. 기여도
        m_MemberList = m_MemberList.OrderBy((data) => data.MemberInfo.kMemberState)
                       .ThenByDescending((data) => UtilFunc.TodayLogon(data.MemberInfo.kLastLogonTime.GetDateTime()))
                       .ThenByDescending((data) => data.MemberInfo.kUserTributeExp).ToList();

        int iCount = m_MemberList.Count;

        for (int i = 0; i < iCount; ++i)
        {
            GuildInformationItem member = m_MemberList[i];
            if (member == null)
            {
                continue;
            }

            member.name = i.ToString();
        }

        m_GuildMemberGrid.sorting      = UIGrid.Sorting.Custom;
        m_GuildMemberGrid.onCustomSort = UtilFunc.SortByNumber;

        //m_GuildMemberGrid.sorting = UIGrid.Sorting.Alphabetic;
        m_GuildMemberGrid.Reposition();
        m_GuildMemberScrollView.ResetPosition();
    }
Пример #8
0
 public void RestDelFriend(FriendView v)
 {
     Destroy(v.gameObject);
     table.Reposition();
     scroll.ResetPosition();
     table.repositionNow = true;
 }
Пример #9
0
        void GetTableItem(object msg)
        {
            Dictionary <string, object> dic = (Dictionary <string, object>)msg;

            if (dic.ContainsKey("totalCount"))
            {
                _totalCount = int.Parse(dic["totalCount"].ToString());
            }
            object        obj     = dic["data"];
            List <object> objList = (List <object>)obj;

            foreach (Dictionary <string, object> info in objList)
            {
                TeaRoomInfoItem item     = YxWindowUtils.CreateItem(InfoItem, grid.transform);
                RoomInfoData    roomInfo = new RoomInfoData();
                roomInfo.ParseData(info);
                item.UpdateView(roomInfo);
            }
            grid.Reposition();
            _request = false;
            if (ScrollView != null && _curPageNum == 2)
            {
                ScrollView.ResetPosition();
            }
        }
Пример #10
0
    IEnumerator InitScroll()
    {
        yield return(null);

        scrollView.ResetPosition();
        StopCoroutine("InitScroll");
    }
Пример #11
0
 private void DisplayBlocks(bool toSave)
 {
     //create real objects
     scrollView.ResetPosition();
     print("creating " + downloadedStrings.Count + " blocks");
     foreach (string stringData in downloadedStrings)
     {
         // create a new block Thumbnail
         GameObject blockObject = NGUITools.AddChild(gridObject, displayPrefab);
         displayedBlocks.Add(blockObject);
         SetFeedReference(blockObject);
         if (imagebufferCount <= 0)
         {
             blockObject.GetComponent <Data>().AddVariables(stringData, true);
         }
         else
         {
             blockObject.GetComponent <Data>().AddVariables(stringData, false);
         }
     }
     //save
     if (toSave)
     {
         SaveDataLocal();
     }
     grid.Reposition();
     scrollView.ResetPosition();
     basePos = scrollView.transform.localPosition;
 }
Пример #12
0
    // Use this for initialization
    void Start()
    {
        base.parent.SetSubTitle("Select multiple cards to sell");
        if (deckObj == null)
        {
            return;
        }

        deckDimension = deckObj.GetComponent <UISprite>().localSize;
        SpawnLocalUserInventory();
        scrollPanel.ResetPosition();

        Vector3 pos = Vector3.zero;

        pos.y = scrollPanel.panel.baseClipRegion.y - (scrollPanel.panel.GetViewSize().y / 2) - 20f;
        bottomHolder.transform.localPosition = pos;

        costLabel.text = totalSellCost.ToString();

        Vector3 pos2 = new Vector3(sortingList.transform.localPosition.x, 0, sortingList.transform.localPosition.z);

        pos2.y = (scrollPanel.panel.finalClipRegion.w - scrollPanel.transform.localPosition.y) - 21f;
        sortingList.transform.localPosition = pos2;

        //base.StartSubPage();
    }
Пример #13
0
    public void Init(bool bBack, C2G.CreatureEvalInitInfoAck init_info = null)
    {
        //if (bBack == true)
        //    return;

        m_InputMessageLabel.defaultText = Localization.Get("EvalInputStartingMsg");
        CreatureInfo creature = CreatureInfoManager.Instance.GetInfoByID(creature_id);

        m_CharacterContainer.Init(AssetManager.GetCharacterAsset(creature_id, "default"), UICharacterContainer.Mode.UI_Normal);
        m_CharacterContainer.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
        m_CharacterContainer.SetPlay(UICharacterContainer.ePlayType.Social);

        item_list = new List <pd_CreatureEvalBoard>();
        item_list = init_info.board_info;

        last_loaded_count = item_list.Count(i => i.is_best == false);

        DrawItems();

        m_ScoreToggle.value       = (CreatureBookManager.Instance.IsExistBook(creature.IDN));
        m_EvalScoreLabel.text     = string.Format("({0})", info.avg_score.ToString("F1"));
        m_FirstObtainerLabel.text = string.IsNullOrEmpty(info.first_obtainer_nickname) ? Localization.Get("EvalNoneFirstObtainer") : info.first_obtainer_nickname;
        m_CharacterNameLabel.text = creature.Name;

        for (int i = 0; i < m_Stars.Count; ++i)
        {
            m_Stars[i].SetSpriteActive(Math.Truncate(init_info.avg_score) > i);
        }

        m_EvalBoardScroll.ResetPosition();
    }
Пример #14
0
    void OnRecvChatMessage(ChatLine line)
    {
        if (DraggedScrollView == true)
        {
            need_refresh = true;
            return;
        }

        var line_obj = ChatLinePrefabManager.GetNewObject <PopupChatLine>(ChatLineGrid.transform, Vector3.zero);

        line_obj.Init(line, new OnNicknameClickDelegate(OnClickNickname), new OnItemClickDelegate(OnClickItem));

        float v = (ChatLineScrollView.transform.localPosition.y - m_start_scrollview_transform_y);

        if (v < 1)
        {
            ChatLineScrollView.ResetPosition();
        }

        ChatLineGrid.Reposition();

        if (ChatLineGrid.GetChildList().Count > ChatLineManager.Instance.ChattingMaxLine)
        {
            ChatLinePrefabManager.Free(ChatLineGrid.GetChild(ChatLineGrid.GetChildList().Count - 1).gameObject);
        }
    }
Пример #15
0
 public void OnUserButtonClick()
 {
     GridBankers.gameObject.SetActive(false);
     GridUsers.gameObject.SetActive(true);
     GridUsers.repositionNow = true;
     GridUsers.Reposition();
     ScrollView.ResetPosition();
 }
Пример #16
0
    private void ResetPosition()
    {
        m_GuildMemberGrid.sorting      = UIGrid.Sorting.Custom;
        m_GuildMemberGrid.onCustomSort = UtilFunc.SortByNumber;

        //m_GuildMemberGrid.sorting = UIGrid.Sorting.Alphabetic;
        m_GuildMemberGrid.Reposition();
        m_GuildMemberScrollView.ResetPosition();
    }
Пример #17
0
 public void OnBankersClick(bool focus)
 {
     if (!focus)
     {
         return;
     }
     ChangeUserList(UserListType.Banker);
     ScrollView.ResetPosition();
 }
Пример #18
0
 public void ChangeUnitEquipMode(BattleUnitData _Unitdata)
 {
     _State = eDeckManagerState.Equipmode;
     sc.ResetPosition();
     gr_Havecards.gameObject.SetActive(false);
     tr_selectmode.gameObject.SetActive(true);
     selectedSlot.SetData(_Unitdata, eUnitSlotType.SelectTargetSlot);
     selectedSlot.IsFreeze = true;
 }
Пример #19
0
        private void OnAnimalModelRefresh(IEvent ievent)
        {
            var e = ievent as ElfModelRefreshEvent;
            CreateFakeCharacter root;
            UIDragRotate drag;

            if (e.Type == 0)
            {
                if (ModelRoot != null)
                {
                    ModelRoot.DestroyFakeCharacter();
                }
                root = ModelRoot;
                drag = ModelDrag;
            }
            else
            {
                if (SkillModelRoot != null)
                {
                    SkillModelRoot.DestroyFakeCharacter();
                }
                root = SkillModelRoot;
                drag = SkillModelDrag;
            }

            var dataId = e.CharId;

            if (dataId == -1)
            {
                return;
            }
            var tableNpc = Table.GetCharacterBase(dataId);

            if (null == tableNpc)
            {
                return;
            }

            if (root == null)
            {
                return;
            }

            var offset = tableNpc.CameraHeight / 10000.0f;

            root.CreateWithColor(dataId, e.ColorId, null, character =>
            {
                character.SetScale(tableNpc.CameraMult / 10000.0f);
                character.ObjTransform.localPosition = new Vector3(0, offset, 0);
                drag.Target = character.transform;
            });
            if (e.Type == 0)
            {
                InfoScroll.ResetPosition();
            }
        }
Пример #20
0
    public void ResetPosition()
    {
        if (m_pScrView == null)
        {
            return;
        }

        m_pScrView.ResetPosition();
        Paint();
    }
Пример #21
0
    private void LoadDetails()
    {
        //set label (it has no input)
        SetLabel(nameObj, GetLabel(data.nameObj));
        descScroll.ResetPosition();
        SetLabel(descObj, data.desc);
        descScroll.ResetPosition();

        GetImage(data);
    }
Пример #22
0
    void OnSearchGuild(pd_GuildInfo info)
    {
        GuildInfoItemPrefabManager.Clear();
        var item = GuildInfoItemPrefabManager.GetNewObject <GuildInfoItem>(m_GridGuild.transform, Vector3.zero);

        item.Init(new pd_GuildInfoDetail(info), OnSelectedGuild);
        item.OnClickGuild();
        m_GridGuild.Reposition();
        m_ScrollGuild.ResetPosition();
    }
Пример #23
0
    public void OnFriendList(List <NetData.FriendBaseInfo> friendList)
    {
        DungeonTable.ColosseumInfo coloInfo = _LowDataMgr.instance.GetLowDataColosseumInfo(NetData.instance.GameRoomData.DungeonId);
        //ulong myRoleId = NetData.instance.GetUserInfo().GetCharUUID();
        for (int i = 0; i < friendList.Count;) //예외처리
        {
            if (!friendList[i].IsLogin)        //접속 종료한 유저 제외시킨다.
            {
                friendList.RemoveAt(i);
            }
            else
            if (friendList[i].nLevel < coloInfo.LimitLevel)//레벨 제한 걸림
            {
                friendList.RemoveAt(i);
            }
            else if (friendList[i].BattlePower < coloInfo.FightingPower)//권장 전투력 미달
            {
                friendList.RemoveAt(i);
            }
            else
            {
                ++i;
            }
        }

        FriendList.Clear();
        FriendList = friendList;

        int count = SlotList.Count < friendList.Count ? friendList.Count : SlotList.Count;

        for (int i = 0; i < count; i++)
        {
            GameObject go = null;
            if (SlotList.Count <= i)
            {
                go = Instantiate(SlotList[0]) as GameObject;
                go.transform.parent        = Grid.transform;
                go.transform.localPosition = Vector3.zero;
                go.transform.localScale    = Vector3.one;
                SlotList.Add(go);
            }
            else
            {
                go = SlotList[i];
            }

            OnCallbackSlot(i, go);
        }

        ScrollView.enabled = friendList.Count < 4 ? false : true;
        ScrollView.ResetPosition();
        Grid.repositionNow = true;

        Empty.SetActive(friendList.Count == 0);
    }
Пример #24
0
    /// <summary>
    /// 总item长度  这里只会添加不会重置重置请用InitScrollView
    /// items用作动态创建的个数必须是mDisplayCount*3倍
    /// </summary>
    public void InsertItem(int item_total_item)
    {
        if (mScrollView == null)
        {
            SetUI(false);
            return;
        }

        if (mTotalItemLenght != item_total_item)
        {
            mTotalItemLenght = item_total_item;
            if (mTotalItemLenght > mDisplayCount)
            {
                if (mScrollView.movement == UIScrollView.Movement.Vertical)
                {
                    if (mTotalItemLenght <= mDisplayCount * 3)
                    {
                        SetUI(false);
                        mScrollView.contentPivot = UIWidget.Pivot.Bottom;
                        mScrollView.ResetPosition();
                        //mScrollView.contentPivot = mOrig;
                        //mScrollView.ScrollToBottom();
                    }
                    else
                    {
                        if ((mTotalItemLenght - 1) % mDisplayCount == 0)
                        {
                            OnOutOfBoundsNotification(UIScrollView.OutOfBounds.VerticalTop);
                            mScrollView.contentPivot = UIWidget.Pivot.Bottom;
                            mScrollView.ResetPosition();
                            //mScrollView.contentPivot = mOrig;
                            //mScrollView.ScrollToBottom();
                        }
                        else
                        {
                            SetUI(false);
                            mScrollView.contentPivot = UIWidget.Pivot.Bottom;
                            mScrollView.ResetPosition();
                            //mScrollView.contentPivot = mOrig;
                            //mScrollView.ScrollToBottom();
                        }
                    }
                }
                else if (mScrollView.movement == UIScrollView.Movement.Horizontal)
                {
                    SpringPanel.Begin(mPanel.gameObject, new Vector3(mPanel.transform.localPosition.x + mXSpace, mPanel.transform.localPosition.y), 13.0f);
                }
            }
            else
            {
                SetUI(false);
            }
        }
    }
Пример #25
0
    void Start()
    {
        m_WindowSize       = new Vector2(Screen.width, Screen.height);
        m_OldFrame         = m_CurrentFrame;
        m_MotionController = m_BvhController;
        m_TmpFilePath      = Application.temporaryCachePath + "/ETRI_TempFile";
        m_MotionFilePath   = "";

        TimeLineScale(-1);
        m_TimeLineScrollView.ResetPosition();
    }
    public void AddItem(ItemInfo _itemInfo)
    {
        if (_itemInfo.HaveItem.Equals("o"))
        {
            GameObject newItemBarObject = Instantiate(this.m_gObjSampleItem, this.transform.position, Quaternion.identity) as GameObject;

            //새로 생성된 아이템바의 부모는 나 자신이다.
            newItemBarObject.transform.SetParent(this.m_grid.transform);

            //스케일 초기화
            newItemBarObject.transform.localScale = new Vector3(0.6f, 0.6f, 0.6f);

            //만들어진 게임오브젝트에서
            //아이템바 컴포넌트 인스턴스를 얻어 아이템 인포셋팅
            ItemScript Item = newItemBarObject.GetComponent <ItemScript>();
            Item.SetInfo(_itemInfo);

            m_lItems.Add(Item);

            if (m_gobView != null)
            {
                for (int i = 0; i < m_lItems.Count; i++)
                {
                    if (m_lItems[i].m_Item.Name == m_gobView.name)
                    {
                        if (m_gobView.activeSelf == true)
                        {
                            Item.SetObj(m_gobView);
                            m_gobView.SetActive(false);
                        }
                    }
                }
            }
        }
        else if (_itemInfo.HaveItem.Equals("x"))
        {
            if (_itemInfo.ObjectState.Equals("R"))
            {
                m_v3SaveObjectPos    = m_gobView.transform.position;
                m_qSaveObjectQuater  = m_gobView.transform.rotation;
                m_qSaveObjectYQuater = m_gobView.transform.GetChild(0).transform.rotation;
                StateMangerScript.StateManger.m_GameState = StateMangerScript.StateGameMode.ObjectRotateState;
                m_gobView.transform.position = CameraManagerScript.CameraManger.GetMainCamera().transform.position
                                               + CameraManagerScript.CameraManger.GetMainCamera().transform.forward * 0.5f;
                m_gobView.transform.LookAt(CameraManagerScript.CameraManger.GetMainCamera().transform);
            }
        }

        //그리드 정렬
        m_grid.Reposition();
        m_scrollView.ResetPosition();
    }
Пример #27
0
 /// <summary>
 /// 玩家列表事件
 /// </summary>
 public virtual void OnUserButtonClick(bool focus)
 {
     if (!focus)
     {
         return;
     }
     ChangeUserList(UserListType.User);
     ScrollView.ResetPosition();
     if (_gridusers != null)
     {
         _gridusers.Reposition();
     }
 }
Пример #28
0
    IEnumerator initScroll()
    {
        yield return(null);

        panel.alpha = 1;

        scrollView.ResetPosition();
        scrollView_rightItems.ResetPosition();

        panel_popup.alpha = 1;

        //SetItemButtonWidth();
        StopCoroutine("initScroll");
    }
Пример #29
0
    IEnumerator RefreshPresentList()
    {
        MyTools.DestroyImmediateChildNodes(PresentGrid.transform);
        UIScrollView sv = PresentGrid.transform.parent.GetComponent <UIScrollView>();

        PlayerBag pb = GameApp.Instance.PlayerData.m_player_bag;

        for (int i = 0, p = 0; i < pb.m_items.Count; i++)
        {
            ItemConfig ItemCfg = null;
            CsvConfigTables.Instance.ItemCsvDic.TryGetValue((int)pb.m_items[i].m_item_id, out ItemCfg);
            if (ItemCfg != null)
            {
                if (ItemCfg.Type == 13)
                {
                    GameObject newUnit = NGUITools.AddChild(PresentGrid.gameObject, PresentUnitPrefab);
                    newUnit.SetActive(true);
                    newUnit.name = "PresentUnit_" + p;
                    int x = 0;
                    if (p % 3 == 0)
                    {
                        x = 0;
                    }
                    else if (p % 3 == 1)
                    {
                        x = 160;
                    }
                    else if (p % 3 == 2)
                    {
                        x = 320;
                    }
                    newUnit.transform.localPosition = new Vector3(x, -160 * (p / 3), 0);

                    UI_Travel_Present_PresentUnit fu = newUnit.GetComponent <UI_Travel_Present_PresentUnit>();
                    fu.SetPresentData(ItemCfg.ItemID);

                    PresentGrid.repositionNow = true;
                    sv.ResetPosition();

                    yield return(new WaitForEndOfFrame());

                    p++;
                }
            }
        }

        PresentGrid.repositionNow = true;
        sv.ResetPosition();
    }
Пример #30
0
 void DisplayPeople()
 {
     //create real objects
     scrollView.ResetPosition();
     foreach (string stringData in downloadedStrings)
     {
         // create a new block Thumbnail
         GameObject blockObject = NGUITools.AddChild(gridObject, displayPrefab);
         displayedBlocks.Add(blockObject);
         SetFeedReference(blockObject);
         blockObject.GetComponent <Data_General>().AddVariables(stringData);
     }
     grid.Reposition();
     scrollView.ResetPosition();
 }