当前位置:网站首页>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
边栏推荐
- CUDA realizes L2 European distance
- c#获取当前的时间戳
- Opencv learning notes -day3 (mat object and creation related operations mat:: clone(), mat:: copyto(), mat:: zeros(), mat:: ones(), scalar()...)
- Introduction to MySQL basics day3 power node [Lao Du] class notes
- Opencv learning notes-day5 (arithmetic operation of image pixels, add() addition function, subtract() subtraction function, divide() division function, multiply() multiplication function
- Detailed explanation of pytoch's scatter function
- QT downloading files through URL
- Tidb 6.0: making Tso more efficient tidb Book rush
- 将线程绑定在某个具体的CPU逻辑内核上运行
- 【付费推广】常见问题合集,推荐榜单FAQ
猜你喜欢
Advanced technology management -- how managers design and build echelons
Occasionally, Flink data is overstocked, resulting in checkpoint failure
Deploy the cow like customer network project on the ECS
Redis design and Implementation (III) | interaction between server and client (event IO model)
Mmdet line by line deltaxywhbboxcoder
Detectron2 source code reading 4-- registrar construction model
TiDB 6.0:让 TSO 更高效丨TiDB Book Rush
Pytorch BERT
Build a docker image of Henkel database from 0
el-input 限制只能输数字
随机推荐
Rew acoustic test (V): equipment required for test
CUDA realizes L2 European distance
[untitled]
[untitled]
[paid promotion] collection of frequently asked questions, FAQ of recommended list
Use Huawei performance management service to configure the sampling rate on demand
Rew acoustic test (II): offline test
Pytorch BERT
Redis design and Implementation (III) | interaction between server and client (event IO model)
[untitled]
Flink Sql -- toAppendStream doesn‘t support consuming update and delete changes which
2021-02-27
快应用中实现自定义抽屉组件
Maxiouassigner of mmdet line by line interpretation
Installation, use and explanation of vulnerability scanning tool OpenVAS
Deploy the cow like customer network project on the ECS
Design specification for smart speakers v1.0
Opencv learning notes-day6-7 (scroll bar operation demonstration is used to adjust image brightness and contrast, and createtrackbar() creates a scroll bar function)
Flink sql -- No factory implements ‘org.apache.flink.table.delegation.ExecutorFactory‘.
Treatment process record of Union Medical College Hospital (Dongdan hospital area)