摘要: 1、准备数据 2、设置ImageViews集合,保存图片,并创建点的集合,并适配点的像素, 3、创建灰点和红点的xml 4、添加ViewPager设配器,重写4个方法 引导页布局 5、计算红点移动位置和设置进入主页按钮事件监听 根据view的生命周期,当执行到onLayout或onDraw时,已经获 阅读全文
posted @ 2017-03-17 11:33 yl007 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1 public class DensityUtil { 2 /** 3 * 根据手机的分辨率从 dp 的单位 转成为 px(像素) 4 */ 5 public static int dip2px(Context context, float dpValue) { 6 final float scale = context.getR... 阅读全文
posted @ 2017-03-17 10:40 yl007 阅读(165) 评论(0) 推荐(0) 编辑