摘要: AnimationDrawabl主要通过xml实现逐帧动画,SDK实例如下:An AnimationDrawable defined in XML consists of a single element, and a series of nested tags. Each item defines a frame of the animation. See the example below. spin_animation.xml file in res/drawable/ folder: Here is the code to load... 阅读全文
posted @ 2013-09-10 12:59 QG_Li 阅读(1246) 评论(0) 推荐(0)
摘要: 转载自:http://www.open-open.com/lib/view/open1329994048671.html3.0以前,android支持两种动画模式,tween animation,frame animation,在android3.0中又引入了一个新的动画系统:property animation,这三种动画模式在SDK中被称为property animation,view animation,drawable animation。1. View Animation(Tween Animation) View Animation(Tween Animation):补间动画,给. 阅读全文
posted @ 2013-09-09 17:05 QG_Li 阅读(354) 评论(0) 推荐(0)
摘要: android定义了2种信号单位:dBm(1毫瓦的分贝数)和asu(alone signal unit 独立信号单元)。 它们之间的关系是:dBm =-113+2*asu,这是google给android手机定义的特有信号单位。asu有效值范围是[0,31],99表示没有连接到基站。参考网址:http://www.miui.com/article-198-1.html 阅读全文
posted @ 2013-08-01 11:38 QG_Li 阅读(274) 评论(0) 推荐(0)
摘要: 如何在代码中创建圆环:先看效果图代码;import android.graphics.drawable.GradientDrawable; GradientDrawable circle = new GradientDrawable(); circle.setSize(200, 200);//设置圆环宽高 circle.setShape(GradientDrawable.OVAL);//设置形状为圆环 circle.setColor(Color.TRANSPARENT);//设置圆环内部填充颜色 circle.setStro... 阅读全文
posted @ 2013-07-24 15:47 QG_Li 阅读(829) 评论(0) 推荐(0)
摘要: 最近在锁屏上研究,如果预置widget,研究了好久,终于找到方法了,先上代码:private int getAppWidgetFromComName(ComponentName providerCom) { int appWidgetId; appWidgetId = mAppWidgetHost.allocateAppWidgetId(); try { mAppWidgetManager.bindAppWidgetId(appWidgetId, providerCom); } catch (IllegalArgum... 阅读全文
posted @ 2013-07-16 15:46 QG_Li 阅读(579) 评论(0) 推荐(0)