当前位置:网站首页>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 .
边栏推荐
- SUSE CEPH add nodes, reduce nodes, delete OSD disks and other operations – storage6
- Implementation of paging
- College students participated in six Star Education PHP training and found jobs with salaries far higher than those of their peers
- MD5加密验证
- 阿里大哥教你如何正确认识关于标准IO缓冲区的问题
- Re11:读论文 EPM Legal Judgment Prediction via Event Extraction with Constraints
- 关于 CMS 垃圾回收器,你真的懂了吗?
- In 2020q2, shipments in the global tablet market soared by 26.1%: Huawei ranked third and Lenovo increased the most!
- 智慧园区是未来发展的趋势吗?
- Efficiency comparison of three methods for obtaining timestamp
猜你喜欢

Re10:读论文 Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr

Egg (19): use egg redis performance optimization to cache data and improve response efficiency

Applet: scroll view slides to the bottom by default

小程序:scroll-view默认滑倒最下面
![[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)

Interesting kotlin 0x06:list minus list

【深度学习】:《PyTorch入门到项目实战》第八天:权重衰退(含源码)

HTAP是有代价的

HTAP comes at a price

【深度学习】:《PyTorch入门到项目实战》第二天:从零实现线性回归(含详细代码)
随机推荐
Installation of QT learning
TCP handshake, waving, time wait connection reset and other records
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"
asmlinkage的理解
Some opinions on bug handling
Record the processing process of CEPH two RBDS that cannot be deleted
SUSE Ceph 增加节点、减少节点、 删除OSD磁盘等操作 – Storage6
【深度学习】:《PyTorch入门到项目实战》第七天之模型评估和选择(上):欠拟合和过拟合(含源码)
Introduction and implementation of stack (detailed explanation)
Semtech launched Lora edge, a geolocation solution for the Internet of things, and the first chip lr1110 is now on the market
[deep learning]: the second day of pytorch introduction to project practice: realize linear regression from zero (including detailed code)
Tcp/ip related
Outline and principle of structured design -- modularization
ticdc同步数据怎么设置只同步指定的库?
Given positive integers n and m, both between 1 and 10 ^ 9, n < = m, find out how many numbers have even digits between them (including N and m)
College students participated in six Star Education PHP training and found jobs with salaries far higher than those of their peers
Question note 4 (the first wrong version, search the insertion position)
Understanding of asmlinkage
Global mobile communication base station market in 2019: Ericsson, Huawei and Nokia ranked in the top three
Learn to use MySQL explain to execute the plan, and SQL performance tuning is no longer difficult