2012年4月26日

动画类的全部方法..

摘要: PublicMethodsvoidcancel()取消动画Canceltheanimation.longcomputeDurationHint()Computeahintathowlongtheentireanimationmaylast,inmilliseconds.intgetBackgroundColor()Returnsthebackgroundcolorbehindtheanimation.booleangetDetachWallpaper()ReturnvalueofsetDetachWallpaper(boolean).longgetDuration()得到时间Howlongth 阅读全文

posted @ 2012-04-26 18:10 明明的天天 阅读(1215) 评论(0) 推荐(0)

得到View的宽度高度

摘要: 先说结论: 在Activity里的oncreate(), onstart(),onResume()中都是拿不到的, 在onWindowFocusChanged()的是可以拿到的.为什么这样?再说原因: 我TM也说不清, 不过大概的知道一点, view的绘制过程是onMeasure(),onLayout(),onDraw(),有人说在onLayout()之后就可以得到了,我觉得准确的说是在onMeasure()之后就可以得到了,但是为什么在onResume()时拿不到?有人又说了,是因为onResume()不是真正的可见的回调方法 ,见:http://www.seangri-la.com/cgi 阅读全文

posted @ 2012-04-26 17:43 明明的天天 阅读(483) 评论(0) 推荐(0)

android 自定义动画5 小知识点集锦

摘要: 1. 几个动画并发的效果可以用<set>,要是按顺序发生的话可以用handler.postDelay(Runnable runnable,minisecond);2. 动画加速器简介:(直译名称)android.R.animConstantsintaccelerate_decelerate_interpolator加速-减速intaccelerate_interpolatorAcceleration curve matching Flash's quadratic ease out function.加速intanticipate_interpolator反向intanti 阅读全文

posted @ 2012-04-26 14:24 明明的天天 阅读(677) 评论(1) 推荐(0)

Android Handler的使用

摘要: 大家好我们这一节讲的是Android Handler的使用,在讲Handler之前,我们先提个小问题,就是如何让程序5秒钟更新一下Title.首先我们看一下习惯了Java编程的人,在不知道Handler的用法之前是怎么样写的程序,代码如下所示:public class AAA extends Activity { // title为setTitle方法提供变量,这里为了方便我设置成了int型 private int title = 0; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstance. 阅读全文

posted @ 2012-04-26 13:50 明明的天天 阅读(252) 评论(0) 推荐(0)

android 自定义动画4 RotateAnimation源码分析

摘要: 源码如下:/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * U 阅读全文

posted @ 2012-04-26 11:50 明明的天天 阅读(2109) 评论(0) 推荐(0)

导航