摘要: 使用Scroller 实现弹性滑动的源码如下 原理: 1.构造一个Scroller对象,并调用startScroll方法。Scroller仅用来保存参数,无实际作用 2.invalidate会导致view重绘,draw又会调用computeScroll 3.computeScroll在view中为空 阅读全文
posted @ 2019-08-22 02:16 pushu007 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 使用LayoutParams() 也可以重新摆放view的位置 我们可以使用LayoutParams的方法来实现view的移动,LayoutParams可以设置view的位置, 也可以通过geLayoutParams方法来获得当前view的位置。自然也可以使用setLayoutParams方法来修改 阅读全文
posted @ 2019-08-22 00:39 pushu007 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 首先是布局资源 activity_main.xml 阅读全文
posted @ 2019-08-22 00:07 pushu007 阅读(312) 评论(0) 推荐(0) 编辑
摘要: enter.xml<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="2000"> <translate and 阅读全文
posted @ 2019-08-21 01:10 pushu007 阅读(638) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/xinpengfei521/article/details/65938389 阅读全文
posted @ 2019-08-20 17:23 pushu007 阅读(1556) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/zhangqunshuai/article/details/90408414 阅读全文
posted @ 2019-08-20 17:15 pushu007 阅读(75) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/zhangqunshuai/article/details/87177948 阅读全文
posted @ 2019-08-20 17:06 pushu007 阅读(317) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/824e59f34c59 阅读全文
posted @ 2019-08-20 17:05 pushu007 阅读(69) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/ba32488f9555 https://www.jianshu.com/p/188530d86a37?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source= 阅读全文
posted @ 2019-08-20 16:54 pushu007 阅读(125) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/cs_lwb/article/details/82823536 阅读全文
posted @ 2019-08-20 11:49 pushu007 阅读(103) 评论(0) 推荐(0) 编辑