当前位置:网站首页>Do you want the dialog box that pops up from the click?
Do you want the dialog box that pops up from the click?
2022-06-30 09:00:00 【Byte station】
Recently implemented a dialog box that pops up from the click , The end result is as follows :
1. Take that
The technologies that can be selected to realize the dialog function are Dialog、PopupWindow、Activity. They all support custom pop-up and vanish animations . Both of them can realize custom animation .
WindowAnimation | Transition | ShareElement Transition | |
---|---|---|---|
Dialog | Support | I won't support it | I won't support it |
PopupWindow | Support | Support | I won't support it |
Activity | Support | Support | Support |
WindowAnimation Animation must be in styles.xml In the definition of , Cannot be dynamically set by code windowEnterAnimation、windowExitAnimation. signify windowAnimation Once set
Animation is fixed , Obviously, it can not meet the function of making pop-up animation from the click . exclude Dialog.Activity It also supports transition animation and shared element transition animation . After some trial and error , Discover though Activity Rich support
The transition animation of , But it is not suitable to complete the functions of this scenario , Finally decided to adopt PopupWindow Realize this function .
2. Demolition
The animation features : Zoom in the animation from the finger click and move the center point of the dialog box to the center of the screen . The core code is as follows
3. Jiezhao
The final code
4. Get the full source code
Pay attention to WeChat public number " Byte station ", reply " Dialog box ", Get the full source code
边栏推荐
- Opencv learning notes -day10 logical operation of image pixels (usage of rectangle function and rect function and bit related operation in openCV)
- 关于Lombok的@Data注解
- [untitled]
- [untitled]
- 127.0.0.1、0.0.0.0和localhost
- About Lombok's @data annotation
- Self made GIF dynamic graph -gifcam
- Influencing factors of echo cancellation for smart speakers
- Axure make menu bar effect
- CUDA implements matrix replication
猜你喜欢
Flink Exception -- No ExecutorFactory found to execute the application
Flink 数据偶尔数据积压导致checkpoint失败
Build a docker image of Henkel database from 0
Mmcv expanding CUDA operator beginner level chapter
Opencv learning notes -day 12 (ROI region extraction and inrange() function operation)
自制GIF动态图-gifcam
VIM from dislike to dependence (21) -- cross file search
Installation, use and explanation of vulnerability scanning tool OpenVAS
vim 从嫌弃到依赖(21)——跨文件搜索
Explanation on the use of password profiteering cracking tool Hydra
随机推荐
Wechat development tool (applet)
VIM from dislike to dependence (21) -- cross file search
C#訪問SQL Server數據庫兩種方式的比較(SqlDataReader vs SqlDataAdapter)
Introduction to MySQL foundation power node [Lao Du] class assignment
Flink Exception -- No ExecutorFactory found to execute the application
国债逆回购绝对安全吗 网上怎么开户
Understanding of MVVM and MVC
Interpretation of source code demand:a rotation equivariant detector for aerial object detection
codeforces每日5题(均1700)-第三天
启动jar包报错UnsupportedClassVersionError,如何修复
vim 从嫌弃到依赖(21)——跨文件搜索
Esp32 things (3): overview of the overall system design
How to format an UTC date to use the Z (Zulu) zone designator in php?
layer. Open processing method when the passed value is an array or the value is too long
Use Huawei performance management service to configure the sampling rate on demand
2021-02-22
C # listbox how to get the selected content (search many invalid articles)
127.0.0.1, 0.0.0.0 and localhost
Introduction to MySQL basics day4 power node [Lao Du] class notes
文件上传 upload 组件 on-success 事件,添加自定义参数