09 2017 档案

listview加载不同条目
摘要:public class NewsAdapter extends BaseAdapter { Context context; List<NewsDataBean.DataBean> list; private final int TYPE_VIDEO = 0; private final int 阅读全文

posted @ 2017-09-08 15:12 葰葰 阅读(97) 评论(0) 推荐(0)

异步加载图片
摘要:public class ImageHelper { private final LruCache<String, Bitmap> mCache; private Context context; public ImageHelper(Context context) { this.context 阅读全文

posted @ 2017-09-05 08:33 葰葰 阅读(123) 评论(0) 推荐(0)

位移动画
摘要:public void trans(View view){ //使用代码创建位移的动画....Translate位移 TranslateAnimation translateAnimation = new TranslateAnimation(Animation.RELATIVE_TO_PARENT 阅读全文

posted @ 2017-09-03 19:17 葰葰 阅读(123) 评论(0) 推荐(0)

组合动画
摘要:public void zuhe(View view) { TranslateAnimation translateAnimation = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO 阅读全文

posted @ 2017-09-03 19:13 葰葰 阅读(103) 评论(0) 推荐(0)

透明度动画 ala
摘要:public void ala(View view) { /** * fromAlpha,开始的透明度 * toAlpha,,结束的 */ AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.5f); alphaAnimation.s 阅读全文

posted @ 2017-09-03 19:11 葰葰 阅读(93) 评论(0) 推荐(0)

旋转动画 rotate
摘要:/** * fromDegrees, 起始的角度 * toDegrees, 终点的角度 * pivotXType, 中心x轴的类型 * pivotXValue, 中心x轴的值 * pivotYType, * pivotYValue * @param view */ public void rotat 阅读全文

posted @ 2017-09-03 19:11 葰葰 阅读(125) 评论(0) 推荐(0)

缩放动画 scale
摘要:public void scale(View view) { /** * pivotXType, 中心点x轴的类型 * pivotXValue, * pivotYType, * pivotYValue */ ScaleAnimation scaleAnimation = new ScaleAnima 阅读全文

posted @ 2017-09-03 19:10 葰葰 阅读(155) 评论(0) 推荐(0)

StreamToString
摘要:private String streamToString(InputStream inputStream,String charset) { try { InputStreamReader inputStreamReader = new InputStreamReader(inputStream, 阅读全文

posted @ 2017-09-01 15:05 葰葰 阅读(186) 评论(0) 推荐(0)