摘要: 关于动画的实现,Android提供了Animation,在Android SDK介绍了2种Animation模式:1. Tween Animation:通过对场景里的对象不断做图像变换(平移、缩放、旋转)产生动画效果,即是一种渐变动画;2. Frame Animation:顺序播放事先做好的图像,是... 阅读全文
posted @ 2014-07-20 20:19 n1rAy 阅读(275) 评论(0) 推荐(0) 编辑
摘要: solid:实心,就是填充的意思android:color指定填充的颜色gradient:渐变android:startColor和android:endColor分别为起始和结束颜色... 阅读全文
posted @ 2014-07-20 20:18 n1rAy 阅读(224) 评论(0) 推荐(0) 编辑
摘要: textview1.setTextColor(Color.argb(255, 0, 255, 0)); //文字透明度控件设为半透明:控件名.getBackground().setAlpha(int); int 在0-255之间package net.android.alpha;import a... 阅读全文
posted @ 2014-07-20 20:04 n1rAy 阅读(10619) 评论(0) 推荐(0) 编辑
摘要: TextView textView= (TextView)findViewById(R.id.textview); LinearLayout.LayoutParams linearParams =(LinearLayout.LayoutParams) textView.getLayoutPara... 阅读全文
posted @ 2014-07-20 20:03 n1rAy 阅读(2960) 评论(0) 推荐(0) 编辑
摘要: 使用此功能一定要添加权限:修改方法:manifest.xml 添加权限 转帖请注明本文出自xiaanming的博客(http://blog.csdn.net/xiaanming/article/details/17761431),请尊重他人的辛勤劳动成果,谢谢!我之前写了一篇关于美团网,大众点评的购... 阅读全文
posted @ 2014-07-20 20:01 n1rAy 阅读(1057) 评论(0) 推荐(0) 编辑
摘要: public static int getStatusBarHeight(Context context){ Class c = null; Object obj = null; Field field = null; int x = 0, s... 阅读全文
posted @ 2014-07-20 19:51 n1rAy 阅读(437) 评论(0) 推荐(0) 编辑
摘要: getLocationOnScreen,计算该视图在全局坐标系中的x,y值,(注意这个值是要从屏幕顶端算起,也就是索包括了通知栏的高度)//获取在当前屏幕内的绝对坐标getLocationInWindow,计算该视图在它所在的widnow的坐标x,y值,//获取在整个窗口内的绝对坐标 (不是很理解=... 阅读全文
posted @ 2014-07-20 19:48 n1rAy 阅读(485) 评论(0) 推荐(0) 编辑
摘要: …… ……我们要做的就是自定义一个GridView控件并插入到中间的LinearLayout中public class MyGridView extends GridView{public MyGridView(Context context, AttributeSet attrs) ... 阅读全文
posted @ 2014-07-20 19:45 n1rAy 阅读(619) 评论(0) 推荐(0) 编辑
摘要: 本文链接:http://blog.csdn.net/xiaodongrush/article/details/285978551. 有哪几种类型?分别有什么用?http://developer.android.com/guide/components/tasks-and-back-stack.htm... 阅读全文
posted @ 2014-07-11 17:31 n1rAy 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 1)打开Window => Preferences窗口2)打开Formatter属性页从Java => CodeStyle => Formatter3) 单击New创建一个自己的Formatter4)选择Line Wrapping属性页,并设置Maximum line width 为1605)然后一... 阅读全文
posted @ 2014-06-30 18:58 n1rAy 阅读(228) 评论(0) 推荐(0) 编辑