2015年10月6日
摘要: 1,drawable转bitmap// 获取待处理的图像方法1BitmapDrawable tmpBitDra = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_launcher);Bitmap tmpBit = tmpBitDr... 阅读全文
posted @ 2015-10-06 11:12 心想快乐 阅读(102) 评论(0) 推荐(0) 编辑
  2015年8月17日
摘要: 47.QuickReturnHeaderhttps://github.com/ManuelPeinado/QuickReturnHeaderListView/ScrollView的header或footer,当向下滚动时消失,向上滚动时出现12.cardsui-for-androidhttps://... 阅读全文
posted @ 2015-08-17 13:52 心想快乐 阅读(90) 评论(0) 推荐(0) 编辑
  2015年6月30日
摘要: 类是java编程的核心1,包一个类他必须存在一个包中//包名//同一个包里面的类可见package sx;//如果要获取其他包里面的类的话import sx.sx630;2 最简单类的定义public class AA{}3 使用定义的类(用该类的对象才能使用)AA a/表示申明了一个AA类型的变量... 阅读全文
posted @ 2015-06-30 23:11 心想快乐 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 引用类型:他们在计算机中存储的只是一个地址 指向一个存储在内存中的变量数组():基本类型 后面加个[]int[] 整型一维数组int[] arr;表示定义一个整型数组arr=new int[5];表示构建一个长度为5的整型数组(分配内存空间)int[] arr=new int[5];分配了一个长度为... 阅读全文
posted @ 2015-06-30 22:24 心想快乐 阅读(106) 评论(0) 推荐(0) 编辑
  2015年6月23日
摘要: 1.ImageViewImageViewimageView=newImageView(this); imageView.setLayoutParams(newLayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT)); 阅读全文
posted @ 2015-06-23 09:45 心想快乐 阅读(86) 评论(0) 推荐(0) 编辑
  2015年6月20日
摘要: 改格式化字符串:String.format("%d%d", pos1, pos2) 阅读全文
posted @ 2015-06-20 16:09 心想快乐 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 获取界面的宽度int mWidth = ViewGroup.LayoutParams.MATCH_PARENT; 阅读全文
posted @ 2015-06-20 15:38 心想快乐 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 动态设置字体大小:textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20);//设置字体为sp格式public class BaselineTextView extends TextView { public BaselineTextView(C... 阅读全文
posted @ 2015-06-20 15:36 心想快乐 阅读(102) 评论(0) 推荐(0) 编辑