当前位置:网站首页>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
边栏推荐
- Understanding society at the age of 14 - reading notes on "happiness at work"
- Detailed explanation of rect class
- [untitled]
- Influencing factors of echo cancellation for smart speakers
- Tidb 6.0: making Tso more efficient tidb Book rush
- Opencv learning notes -day4 image pixel reading and writing operations (array traversal and pointer traversal implementation, uchar vec3b data type and mat class functions mat:: at(), mat:: ptr())
- CUDA implements matrix replication
- [untitled]
- Raspberry pie 4B no screen installation system and networking using VNC wireless projection function
- Detectron2 source code reading 4-- registrar construction model
猜你喜欢

Enhance the add / delete operation of for loop & iterator delete collection elements

How can we get a satisfactory salary? These routines still need to be mastered

Anchorgenerator for mmdet line by line interpretation

Wikimedia Foundation announces the first customers of its new commercial product "Wikimedia enterprise"

Evaluation standard for audio signal quality of intelligent speakers

Use Huawei performance management service to configure the sampling rate on demand

技术管理进阶——管理者如何进行梯队设计及建设

Qt连接神通数据库

2021-04-29

Esp32 things (3): overview of the overall system design
随机推荐
Flink Exception -- No ExecutorFactory found to execute the application
Esp32 things (3): overview of the overall system design
Redis design and Implementation (VI) | cluster (sharding)
Interference source current spectrum test of current probe
Esp32 (4): overview of the overall code architecture
Unity basic lighting model
Flink SQL 自定义 Connector
Opencv learning notes -day10 logical operation of image pixels (usage of rectangle function and rect function and bit related operation in openCV)
Self made GIF dynamic graph -gifcam
Opencv learning notes-day5 (arithmetic operation of image pixels, add() addition function, subtract() subtraction function, divide() division function, multiply() multiplication function
Esp32 things (I): Preface
TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush
el-input 限制只能输数字
Comparaison de deux façons d'accéder à la base de données SQL Server (sqldatareader vs sqldataadapter)
基于Svelte3.x桌面端UI组件库Svelte UI
[untitled]
Icon resources
2021-04-29
[paid promotion] collection of frequently asked questions, FAQ of recommended list
Interpretation of source code demand:a rotation equivariant detector for aerial object detection