android animation
来源:互联网 发布:知行理工闪退 编辑:程序博客网 时间:2024/05/18 01:13
一
动画的边界问题:通常,只受制于父布局的边界,比如这个布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" tools:context=".MainActivity" > <TextView android:id="@+id/te" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="android" /> <ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher" /></LinearLayout>
因为父布局的宽是wrap_content,这表示,子view有多宽,父布局就有多宽,假设texteview有36dp,当给Textview设置平移,那么,屏幕只有0-36dp部分能够显示动画
非父布局的边界对于view的动画没有影响
比如imageview就可以向上移动,会覆盖textview
二
动画只以当前View为标准,不会进行重复计算
比如VIEW1在View2的上方,遮挡住一部分
这时候,让VIEW2进行平移运动,view2显示运动的部分只是没有被View1遮住的这部分
首先得到这个view的位置,然后对屏幕这个位置的像素等信息进行提取,这个信息提取是动画开始时view已经绘制出的信息,比如被遮住的View,实际绘制出的就是没遮住的部分,是从这里面提取的,而不是view的实际信息
0 0
- Android -animation-Property Animation
- Android-animation-View Animation
- Android-animation-drawable Animation
- android animation
- Android Animation
- android animation
- android Animation
- Animation Android
- Android Animation
- android animation
- android animation
- android animation
- Android Animation
- Android--Animation
- android animation
- android animation
- android Animation
- Android Animation
- printf 使用
- Android Studio为APP签名,提取签名的SHA1/MD5编码
- 从一个盒子模型说起
- Spring通过注解使用定时器(已经验证)
- 秒杀技术的实现以及相应防作弊策略介绍
- android animation
- leetcode First Bad Version
- c++ 顺序存储和链表存储 栈的实现代码
- ExtJs—Grid多选框中勾选与单击事件的冲突
- 问题-ListView 使用的时候,已经遇到的问题;
- Intel Edison C++ 开发之I2C-使用MRAA库进行C/C++开发
- 2016 免费申请邓白氏码的步骤
- Generate Parentheses C++
- javascript JSON