随笔分类 -  android

摘要:一。onConfigurationChanged 与android:configChangesLists configuration changes that the activity will handle itself. When a configuration change occurs at... 阅读全文
posted @ 2014-06-20 10:41 等风来。。 阅读(291) 评论(0) 推荐(0) 编辑
摘要:1.正常情况 正常启动的过程中,他们被调用的顺序是 onCreate -> onStart -> onResume, 在被干掉的时候顺序是onPause -> onStop -> onDestroy ,这样就是一个完整的生命周期。程序正运行着呢来电话了,新出的一个全屏的Activity,那么:... 阅读全文
posted @ 2014-06-19 00:34 等风来。。 阅读(217) 评论(0) 推荐(0) 编辑
摘要:apk程序是运行在虚拟机上的,对应的是Android独特的权限机制,只有体现到文件系统上时才使用linux的权限设置。(1)Android中的apk必须签名(2)基于UserID的进程级别的安全机制(3)默认apk生成的数据对外是不可见的(4)AndroidManifest.xml中的显式权限声明 阅读全文
posted @ 2014-06-18 14:12 等风来。。 阅读(1187) 评论(0) 推荐(0) 编辑
摘要:一。要点If in the course of processing the event, the view's bounds may need to be changed, the view will callrequestLayout().Similarly, if in the course ... 阅读全文
posted @ 2014-06-13 11:57 等风来。。 阅读(486) 评论(0) 推荐(0) 编辑
摘要:Service 是android的一种机制,如果是Local Service,那么对应的 Service 是运行在主进程的 main 线程上的。如果是Remote Service,那么对应的 Service 则是运行在独立进程的 main 线程上。因此请不要把 Service 理解成线程,它跟线程半... 阅读全文
posted @ 2014-06-12 12:14 等风来。。 阅读(275) 评论(0) 推荐(0) 编辑
摘要:1.局部坐标系(Local Coordinate) 所谓本地坐标系,就是坐标系以物体的中心为坐标原点,物体旋转、平移等操作都是围绕局部坐标系进行的。这时当物体模型进行旋转、平移等操作时,局部坐标系也执行相应的旋转、平移等操作。2.全局坐标系(World Coordinate) 所谓全局坐标系就是将所... 阅读全文
posted @ 2014-06-12 00:13 等风来。。 阅读(519) 评论(0) 推荐(0) 编辑
摘要:1、ProgressBar有两个进度,一个是android:progress,另一个是android:secondaryProgress。比如视频的缓存进度以及播放进度。在这里缓存的进度就可以是android:secondaryProgress,而播放进度就是android:progress。 2、... 阅读全文
posted @ 2014-06-09 17:13 等风来。。 阅读(295) 评论(0) 推荐(0) 编辑
摘要:一。重要方法1.translate2.scale3.rotate二。注意1.明确顺序canvas.rotate(45);canvas.drawRect(new Rect(50, 50, 100, 100), paint);如果顺序调换,则没有旋转的效果2.转换的时候,需要把转换的中心点移到shape... 阅读全文
posted @ 2014-06-06 14:48 等风来。。 阅读(237) 评论(0) 推荐(0) 编辑
摘要:一。介绍public abstract void invalidateDrawable (Drawable who)Called when the drawable needs to be redrawn. A view at this point should invalidate itself ... 阅读全文
posted @ 2014-06-05 00:11 等风来。。 阅读(423) 评论(0) 推荐(0) 编辑
摘要:在onDraw方法里,我们经常会看到调用save和restore方法,它们到底是干什么用的呢?int px = getMeasuredWidth();int py = getMeasuredWidth(); // Draw backgroundcanvas.drawRect(0, 0, px, py... 阅读全文
posted @ 2014-06-04 00:04 等风来。。 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-05-31 14:09 等风来。。 阅读(133) 评论(0) 推荐(0) 编辑
摘要:If you are supporting pre-3.0 with your application be sure you put this version of the custom theme invalues-v11or similar. 阅读全文
posted @ 2014-05-26 10:43 等风来。。 阅读(269) 评论(0) 推荐(0) 编辑
摘要:onFling will get executed when a user makes a "fling" motion, and said motion has a velocity with it to determine the type of fling it was. However,... 阅读全文
posted @ 2014-05-23 16:35 等风来。。 阅读(417) 评论(0) 推荐(0) 编辑
摘要:1.IPC解决方案 而非 序列化机制 Container for a message (data and object references) that can be sent through an IBinder. A Parcel can contain both flatteneddata ... 阅读全文
posted @ 2014-05-22 18:16 等风来。。 阅读(1568) 评论(0) 推荐(1) 编辑
摘要:Contains methods to standard constants used in the UI for timeouts, sizes, and distances.一。几个常用的方法返回初始化滑动的最大速度值和最小速度值,以像素/秒为单位getScaledMinimumFlingVel... 阅读全文
posted @ 2014-05-21 18:35 等风来。。 阅读(891) 评论(0) 推荐(0) 编辑
摘要:TouchDelegate(Rect bounds, View delegateView)Parameters:bounds Bounds in local coordinates of the containing view that should be mapped to the delegat... 阅读全文
posted @ 2014-05-21 16:35 等风来。。 阅读(289) 评论(0) 推荐(0) 编辑
摘要:There is no real difference, except that theView.postis helpful when you don't have a direct access to the activity. public boolean post(Runnable a... 阅读全文
posted @ 2014-05-21 16:25 等风来。。 阅读(298) 评论(0) 推荐(0) 编辑
摘要:A MeasureSpec encapsulates the layout requirements passed from parent to child. Each MeasureSpec represents a requirementfor either the width or the h... 阅读全文
posted @ 2014-05-18 18:28 等风来。。 阅读(1302) 评论(0) 推荐(0) 编辑
摘要:public voidoverridePendingTransition(int enterAnim, int exitAnim) Call immediately after one of the flavors ofstartActivity(Intent)orfinish()to speci... 阅读全文
posted @ 2014-05-16 14:48 等风来。。 阅读(272) 评论(0) 推荐(0) 编辑
摘要:当用户触摸屏幕的时候,会产生许多手势,例如down,up,scroll,filing等等,我们知道View类有个View.OnTouchListener接口,通过重写他的onTouch(Viewv,MotionEventevent)方法,我们可以处理一些touch事件,但是这个方法太过简单,如果... 阅读全文
posted @ 2014-05-16 14:28 等风来。。 阅读(157) 评论(0) 推荐(0) 编辑

------------------------------------------------------------------------------------------------------------ --------------- 欢迎联系 x.guan.ling@gmail.com--------------- ------------------------------------------------------------------------------------------------------------
点击右上角即可分享
微信分享提示