常用易混方法及其参数
来源:互联网 发布:麦克雷爆头伤害数据 编辑:程序博客网 时间:2024/06/12 19:39
*************************************************************
关于动画的参数:
//移动动画
TranslateAnimation(float fromXDelta, float toXDelta, float fromYDelta, float toYDelta)
TranslateAnimation(int fromXType, float fromXValue, int toXType, float toXValue, int fromYType, float fromYValue, int toYType, float toYValue)
//缩放动画
ScaleAnimation(float fromX, float toX, float fromY, float toY)
ScaleAnimation(float fromX, float toX, float fromY, float toY, float pivotX, float pivotY)
ScaleAnimation(float fromX, float toX, float fromY, float toY, int pivotXType, float pivotXValue, int pivotYType, float pivotYValue)
//旋转动画
RotateAnimation(float fromDegrees, float toDegrees)
RotateAnimation(float fromDegrees, float toDegrees, float pivotX, float pivotY)
RotateAnimation(float fromDegrees, float toDegrees, int pivotXType, float pivotXValue, int pivotYType, float pivotYValue)
//淡入淡出
AlphaAnimation(float fromAlpha, float toAlpha)
*************************************************************
形状参数:
public Rect(int left, int top, int right, int bottom)
Create a new rectangle with the specified coordinates. Note: no range checking is performed, so the caller must ensure that left <= right and top <= bottom.
参数:
left- The X coordinate of the left side of the rectagle
top- The Y coordinate of the top of the rectangle
right- The X coordinate of the right side of the rectagle
bottom- The Y coordinate of the bottom of the rectangle
注:coordinate(坐标)
RectF 同上
*************************************************************
布局参数:
layout方法:publicvoidlayout(intl,intt,intr,intb);
该方法是View的放置方法,在View类实现。调用该方法需要传入放置View的矩形空间左上角left、top值和右下角right、bottom值。这些值是相对于父控件而言的例如传入的是(10, 10, 100, 100),则该View在距离父控件的左上角位置(10, 10)处显示,显示的大小是宽高是90(参数r,b是相对左上角的),这有点像绝对布局。
onlayout方法:@Override protected abstractvoid onLayout(booleanchanged,
intl,intt,intr,intb);
该方法在ViewGroup中定义是抽象函数,继承该类必须实现onLayout方法,而ViewGroup的onMeasure并非必须重写的。View的放置都是根据一个矩形空间放置的,onLayout传下来的l,t,r,b分别是放置父控件的矩形可用空间(除去margin和padding的空间)的左上角的left、top以及右下角right、bottom值。
*************************************************************
//关于滚动:
view.scrollBy(int x, int y)
Move the scrolled position of your view. This will cause a call to onScrollChanged(int, int, int, int) and the view will be invalidated.
参数:
x- the amount of pixels to scroll by horizontally(X方向上移动的像素)
y- the amount of pixels to scroll by vertically(Y方向上移动的像素)
view.scrollTo(int x, int y)
Set the scrolled position of your view. This will cause a call to onScrollChanged(int, int, int, int) and the view will be invalidated.
参数:
x- the x position to scroll to
y- the y position to scroll to
*************************************************************
- 常用易混方法及其参数
- Java常用参数及其作用
- Maven常用参数及其说明
- Maven常用参数及其说明
- Maven常用参数及其说明
- Java方法参数及其传递
- session接口及其常用方法
- javascript数据类型及其常用方法
- Groovy字符串及其常用方法
- PDO常用方法及其应用
- $.ajax()常用参数的设置及其意义
- Struts2 的应用及其常用配置参数
- spark运行方式及其常用参数
- 常用复制粘贴命令及其参数
- caffe——常用层及其参数
- Linux下常用命令行及其参数整理
- Java常用类及其常用方法
- java中常用类及其常用方法
- JS面向对象的程序设计
- 几个高危端口
- 【oracle】Oracle数据库TNS常见错误的解决方法
- Android通过在布局文件中设置include实现xml布局的复用
- Maven项目启动时报错org.springframework.web.context.ContextLoaderListener
- 常用易混方法及其参数
- OC中字典基本用法
- 博客系统要点的一些回顾
- [LeetCode]Binary Tree Zigzag Level Order Traversal
- PhoneGap/Cordova学习笔记--1.Android环境搭建
- 如何集成inmobi到ios
- c++中vector的用法详解
- [Android教程] Android系统Intent中的Uri使用
- C++学习:初识类