摘要: 参考了https://blog.csdn.net/qibin0506/article/details/49716795 由于recycleview没有直接添加头部view的api,所以需要我们自己去添加,下面贴上代码 阅读全文
posted @ 2018-07-18 15:01 劳猿外 阅读(1217) 评论(0) 推荐(0) 编辑
摘要: package com.meizu.ui.gifts; import android.app.Activity; import android.content.Context; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import and... 阅读全文
posted @ 2018-07-05 16:34 劳猿外 阅读(933) 评论(0) 推荐(0) 编辑
摘要: 然后自定义一个MyApplication extends MultiDexApplication , 最后要在 阅读全文
posted @ 2018-07-03 17:29 劳猿外 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1.蓝牙开发 http://www.jizhuomi.com/android/course/282.html 2.glide图形变换 https://github.com/wasabeef/glide-transformations 阅读全文
posted @ 2018-06-26 16:10 劳猿外 阅读(200) 评论(0) 推荐(0) 编辑
摘要: glide在github地址:https://github.com/bumptech/glide 1.添加依赖(最好看官网,因为有时候添加依赖的会有轻微改动,版本也会一直更新) 2.简单使用 调用Glide.with()方法用于创建一个加载图片的实例。with()方法可以接收Context、Acti 阅读全文
posted @ 2018-04-13 10:52 劳猿外 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 使用 RecyclerView 要做下面这些操作, 1.在build.gradle添加 2.在布局中添加RecyclerView组件 3.写Adapter,这里实现了点击事件和长按时间, 4.写一下Bean 5.在Activity里面写逻辑 阅读全文
posted @ 2018-04-10 14:29 劳猿外 阅读(1602) 评论(0) 推荐(0) 编辑
摘要: 我们做table时,常常想做一个滑块的移动效果,来让app显得更加生动,原理很简单,废话不说,直接上code 阅读全文
posted @ 2018-01-25 17:59 劳猿外 阅读(392) 评论(0) 推荐(0) 编辑
摘要: 在开发中经常会遇到这样的情况,一个按钮点击后会弹出Toast或者Dialog,如果快速重复地点击,则Toast则会重复地出现. 而我们想要的效果是一定时间内的点击只生效一次,或者说这种快速且重复的点击为无效点击. 解决的思路如下: 1. 需要定义一个全局变量 lastClickTime, 用来记录最 阅读全文
posted @ 2018-01-17 17:34 劳猿外 阅读(183) 评论(0) 推荐(0) 编辑
摘要: public class MainActivity extends AppCompatActivity { private TextView kuandu; float curTranslationX; float width; float height; private Button out; private Button in; priva... 阅读全文
posted @ 2018-01-12 11:33 劳猿外 阅读(697) 评论(0) 推荐(0) 编辑
摘要: @SuppressLint("AppCompatCustomView") public class SquareImageButton extends ImageButton { public SquareImageButton(Context context) { super(context); } public SquareImageButton(C... 阅读全文
posted @ 2018-01-09 10:27 劳猿外 阅读(158) 评论(0) 推荐(0) 编辑