当前位置:网站首页>Ugui learning notes (II) Scrollview related
Ugui learning notes (II) Scrollview related
2022-07-28 17:04:00 【More than a curtain a dream】
Learning to ScrollView When I met a small pit . Take a note .
The hierarchy is shown in the figure .

This scrollpanel I created an empty object myself and dragged it ScrollView Script for , Added a image and mask. Under it, a grids, The script mounted above is shown in the figure

GridLayoutGroup It's like a container , The sub objects under it will be automatically arranged . except GridLayoutGroup Besides VerticalLayoutGroup and HorizontalLayoutGroup. The specific interface of the layout can be modified by modifying the parameters on the panel . The specific effect can be tried out, so I won't say much here .ContentSizeFitter It is used to automatically calculate the spacing of each element . In dynamic generation UI There is no need to set the interface manually . among RectTransform Of H Delta This value will affect grids Sliding range of . Because of the addition of ContentSizeFitter This component cannot be modified manually .
The point is scrollpanel The components mounted on . Pictured

content Drag into the parent object of all elements you want to slide Here is grids. The following two buttons are used to choose whether to slide horizontally or vertically . Then there is the sliding type , You can try each effect by yourself . Next is the recovery time , inertia . I'm not very clear about the next two parameters .Viewport Can be null . It's not clear exactly what happened . Then there are vertical and horizontal sliding bars . It can also be empty .mask Used for masking .
That's basically it . Then talk about the pit I encountered .
I was in Hierarchy Create an empty object directly on the panel, and then put ScrollRect Added by components . You will encounter Mingming adjustment grids But a run grids It will bounce back to its original position and grids Obviously, there is still a long problem that can't be delayed . I consulted the boss and solved it for a long time .. But I don't know how to solve it .. But it is said that the key point is RectTransform On .scrollpanel Upper RectTransform Of Height Is with the grids The initial position of the runtime .grids It's very long but can't drag. It's related to grids Of bottom namely HDelta of .
But none of this matters .. Because just direct

This creates a ScrollView There will be no pit I just said ..
That's about it . Then I will add others .
边栏推荐
- Re10:读论文 Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr
- Interesting kotlin 0x0a:fun with composition
- 13 differences between MySQL and Oracle
- Time complexity
- SUSE Ceph 快速部署 – Storage6
- 大学生参加六星教育PHP培训,找到了薪水远超同龄人的工作
- Probability theory and mathematical statistics Chapter 1
- Technology sharing | how to recover the erroneously deleted table and the data in the table?
- 华为Mate 40系列曝光:大曲率双曲面屏,5nm麒麟1020处理器!还将有天玑1000+的版本
- After paying $1.8 billion in royalties to Qualcomm, Huawei reportedly ordered 120million chips from MediaTek! Official response
猜你喜欢
![[deep learning]: day 5 of pytorch introduction to project practice: realize softmax regression from 0 to 1 (including source code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: day 5 of pytorch introduction to project practice: realize softmax regression from 0 to 1 (including source code)

MySQL 5.7 and sqlyogv12 installation and use cracking and common commands

Learn to use MySQL explain to execute the plan, and SQL performance tuning is no longer difficult

Interesting kotlin 0x08:what am I
![[deep learning]: the second day of pytorch introduction to project practice: realize linear regression from zero (including detailed code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: the second day of pytorch introduction to project practice: realize linear regression from zero (including detailed code)

HTAP是有代价的

Technology sharing | how to recover the erroneously deleted table and the data in the table?

大学生参加六星教育PHP培训,找到了薪水远超同龄人的工作

Microsoft: edge browser has built-in disk cache compression technology, which can save space and not reduce system performance

负整数及浮点数的二进制表示
随机推荐
egg(十九):使用egg-redis性能优化,缓存数据提升响应效率
Re14:读论文 ILLSI Interpretable Low-Resource Legal Decision Making
Outline and principle of structured design -- modularization
PHP calculate coordinate distance
PostgreSQL每周新闻—2022年7月20日
小程序:获取元素节点信息
快速掌握 Kotlin 集合函数
[deep learning]: the second day of pytorch introduction to project practice: realize linear regression from zero (including detailed code)
Detailed steps for setting up SUSE storage6 environment – win10 + VMware Workstation
阿里云-武林头条-建站小能手争霸赛
Interesting kotlin 0x07:composition
有趣的 Kotlin 0x07:Composition
获取时间戳的三种方法的效率比较
给定正整数N、M,均介于1~10 ^ 9之间,N <= M,找出两者之间(含N、M)的位数为偶数的数有多少个
Interesting kotlin 0x09:extensions are resolved statically
Create a self-organizing / safe / controllable Lora network! Semtech responded for the first time to the impact of the "new regulations of the Ministry of industry and information technology"
SUSE CEPH add nodes, reduce nodes, delete OSD disks and other operations – storage6
Quickly master kotlin set functions
Simple addition, deletion, modification and query of commodity information
Applet: get element node information