- 博客(85)
- 收藏
- 关注
转载 快速解决 ScrollView嵌套RecyclerView滑动冲突相关问题
转载于https://www.jianshu.com/p/d456f4e88697 十分感谢作者更多问题可以看原作者深入解决方案下面就来实际解决本文中遇到的滑动冲突问题。通过上述分析可知,本文所遇到的问题通过外部拦截法,重写ScrollView的onInterceptTouchEvent()方法即可快速简单的解决。//如果你很着急,重写ScrollView ,然后在布局中引用这个...
2019-08-19 17:34:27
386
转载 Android AutoLayout集成使用
转载自楊帥简书https://www.jianshu.com/p/da5d5d4d0901由于Android屏幕尺寸众多的情况,Android适配一直是个问题,谷歌推出了百分比布局,本人有使用,但是百分比布局在部分时候适配并不是那么完美,偶然机会看到鸿洋大神推出的AutoLayout,在公司也开始广泛使用,本人也由百分比布局转为AutoLayout,大神写的帖子太深奥,使用时候本菜鸟觉...
2019-06-21 21:13:49
313
原创 富文本 解决HTML字段
转载自:https://blog.youkuaiyun.com/qq_36467463/article/details/79072428 RichTextAndroid平台下的富文本解析器流式操作 低侵入性 支持Html和Markdown格式文本 支持图片点击和长按事件 链接点击事件和长按事件 支持设置加载中和加载错误时的图片 支持自定义超链接的点击回调 支持修正图片宽高 ...
2019-01-10 10:43:31
1908
原创 Activity沉浸式
// 沉浸式依赖implementation 'com.gyf.immersionbar:immersionbar:2.3.3-beta05'ImmersionBar.with(this) .transparentStatusBar() //透明状态栏,不写默认透明色 .transparentNavigationBar()...
2018-12-02 18:50:00
537
原创 解决ScrollView嵌套ListView滑动冲突
重写listview:public class ListViewVi extends ListView { //重写构造 public ListViewVi(Context context) { this(context, null); } public ListViewVi(Context context, AttributeSet attr...
2018-11-30 10:23:10
4309
3
原创 自定义LayoutManager实现旋转木马相册效果
github: https://github.com/ChenLittlePing/RecyclerCoverFlow?tdsourcetag=s_pcqq_aiomsg
2018-11-30 08:36:08
884
原创 购物车,
商家Adapter:public class ShopperAdapter extends RecyclerView.Adapter<ShopperAdapter.ViewHolder> { private Context context; private List<CartBean.DataBean> list; public Sh...
2018-11-23 07:57:43
250
原创 上传头像,相机相册文件转换为File文件
1,弹出dialog 相机按钮,相册按钮,//弹出dialog private void getDialog() { dialog = new Dialog(this); //填充对话框的布局 View inflate = LayoutInflater.from(this).inflate(R.layout.popup_wind...
2018-11-21 21:21:06
697
原创 Android开发之炫酷MD风格
转载于:https://www.cnblogs.com/1925yiyi/p/7466568.html?tdsourcetag=s_pcqq_aiomsg 2.加载效果3.自定义动态柱形图4.MaterialPowerMenu 点击按钮切换页面加载呈现效果5.加载框效果6.侧滑框架7.dialog效果以及各种dialog样式8.WilliamChar...
2018-11-21 19:44:29
1408
原创 Retrofit+RxJava备忘
仅作备忘。 //配置retrofit2.0 compile 'com.squareup.retrofit2:retrofit:+' compile 'com.squareup.retrofit2:converter-gson:+' //rxjavacompile 'com.squareup.retrofit2:adapter-rxjava2:+'compile '...
2018-11-11 21:09:54
152
原创 EventBus 简单使用
1,注册接收者 //在生命周期中, 注册与销毁EvtentBus@Override protected void onStart() { super.onStart(); EventBus.getDefault().register(this); } @Override protected void onDestro...
2018-11-04 21:04:27
253
原创 GreenDao数据库简单配置和升级
GreenDao数据库简单配置和升级 转载于https://blog.youkuaiyun.com/AndroidStudioo/article/details/78830569创建数据库 DaoManagerpublic class DaoManager { private static DaoManager daoManager; private DaoSessio...
2018-11-04 20:29:38
190
原创 Retrofit 简单使用
//配置retrofit2.0implementation 'com.squareup.retrofit2:retrofit:+'implementation 'com.squareup.retrofit2:converter-gson:+' 1,创建登录接口public interface ILoginApi { //登录接口 @GET("user/{ad...
2018-11-04 19:18:47
566
原创 自定义ButterKnife
自定义注解创建好项目之后,点击File,新建一个Module,选择Library 将module添加依赖 新建自定义注解 @interface1,查找控件@Retention(RetentionPolicy.RUNTIME)@Target(ElementType.FIELD)public @interface BindView { @IdRes int...
2018-11-01 19:09:23
375
原创 常用依赖
Butterknife步骤 <一键生成绑定>implementation 'com.jakewharton:butterknife:9.0.0-rc1'annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1' retrofit2.0 <网络请求框架> //配置retrof...
2018-10-31 13:19:37
236
转载 Fresco 简单使用
转载自:https://www.cnblogs.com/RGogoing/p/6208171.html导入依赖 //Fresco implementation 'com.facebook.fresco:fresco:1.9.0' // 支持 GIF 动图,需要添加 implementation 'com.facebook.fresco:animated-...
2018-10-30 20:31:36
349
原创 解决无法导入某些依赖
如果出现某些依赖库无法成功依赖 :报错: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.facebook.fresco:fresco:1.9.0. 在外层的build.gradle中添加如下代码 分别在buildscript,allprojec...
2018-10-30 16:14:51
1413
原创 仿京东分类
写的比较简单,仅作备忘。如果有问题,可以评论提问,我会及时答复。分类页面:public class ClassActivity extends AppCompatActivity { private String childrenURL = "http://www.zhaoapi.cn/product/getProductCatagory"; private Str...
2018-10-25 19:33:08
266
原创 友盟集成qq登录注意事项
在成功的方法里的得到用户头像,用户名等信息 (Map集合中取得)Toast.makeText(MainActivity.this, "成功了", Toast.LENGTH_LONG).show(); //加载用户名 name.setText(data.put("name","name")); //加载图片 Picasso.with(MainActivity.this).loa...
2018-10-21 20:08:34
314
原创 自定义View,流式布局,
写的比较基础, 备忘使用。public class FlowLayout extends ViewGroup { public FlowLayout(Context context) { this(context, null); } public FlowLayout(Context context, AttributeSet attrs)...
2018-10-09 16:35:11
301
原创 shape圆角边框,搜索框圆角边框
搜索圆角边框:在drawable文件夹下创建xml文件, 根布局设置<shape><shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#EFEEED"&g..
2018-10-09 15:43:57
2068
原创 解决Gradle版本冲突
解决这行冲突, 报错的时候 Alt + 回车不能解决大部分冲突问题configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (reque...
2018-10-08 16:39:18
7006
1
原创 水波纹(自定义View)
自定义控件:public class WaveView extends View { private static final String TAG = "WaveView"; private float fai = 0; private Paint paint1; private Paint paint2; private Path path1;...
2018-10-07 21:27:55
142
转载 高德地图,定位
转载于:https://www.cnblogs.com/cainiaodongdong/p/7684972.html首先打开高德地图开放平台(已经下载好的可以忽略上面几部,但如果是新工程key值一定要重新换,因为包名不一样);http://lbs.amap.com/ 具体申请key值可打开http://blog.youkuaiyun.com/alpha58/article/detail...
2018-09-16 21:58:16
879
转载 高德地图简单集成
转载请注明出处:http://blog.youkuaiyun.com/alpha58/article/details/56488734前言当项目中需要使用地图SDK的时候, 是选择高德地图还是百度地图呢?从对开发者友好角度,从容易上手角度:高德完胜百度! 所以我们公司的项目也选择了高德地图。好了!下面就开始高德地图的集成吧!一,账号与Key的申请注册成为高德开发者需要分三步: 第一步,注册高...
2018-09-15 11:23:07
1790
转载 Umeng 第三方集成
转载自: https://www.jianshu.com/p/7025087dc0ec 第一步:注册,登录第二步:进入个人中心第三步:添加新应用 第四步:填写基本信息,获取Appkey 第五步:下载SDK 如上图箭头所示(一定要选择社会化分享的SDK) 选择需要分享和授权登录的平台第六步:将SDK直接拖入项目中 第七步:添加系...
2018-09-10 17:30:42
400
原创 java 正则表达式手机号码验证
/** * 验证手机号码是否合法 */ public static boolean validatePhoneNumber(String mobiles) { String telRegex = "^((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147,145))\\d{8}$"; return !...
2018-09-08 11:34:02
4753
转载 自定义View
柱形统计图https://blog.youkuaiyun.com/weixin_41454168/article/details/79553303
2018-09-01 11:28:20
110
原创 github 教程
github 教程:https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000 git教程 官方文档:https://guides.github.com/activities/hello-world/
2018-08-29 17:21:26
163
原创 购物车
Viewpublic class MainActivity extends AppCompatActivity implements SubAdapter.OnItemCheckedLisenter { @BindView(R.id.cb_all) CheckBox cbAll; @BindView(R.id.tv_price) TextView tv...
2018-08-23 21:59:50
129
转载 写给小白——recyclerview的基本使用(毫无杂质版)
作者:justCode_链接:https://www.jianshu.com/p/bb6b029de04f來源:简书简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。 前言:其实在百度上已搜说recyclerview,可以找到很多的文档。那么我写这篇文章的意义在哪里呢?其实,就是细化一些细节,并且把一些基本的套路明确化,简单来说,就是做到,你不懂recy...
2018-08-23 21:01:00
605
原创 Android 常用第三方
BRVAH 很好用的添加删除条目: https://www.jianshu.com/p/b343fcff51b0zxing 二维码: https://github.com/zxing/zxing一片枫叶 二维码,集成后直接是竖向屏幕 https://github.com/yipianfengye/android-zxingLibrary...
2018-08-19 19:37:33
148
原创 MVP
// Modlepublic class ModelImpl implements IContract.IModel { private static final String POST_UTILS = "https://www.zhaoapi.cn/user/reg"; private static final String POST_UTILSS = "https:...
2018-08-12 21:41:54
150
原创 OKHttp
// Viewpublic class MainActivity extends AppCompatActivity implements IContract.IView { @BindView(R.id.et_location) EditText etLocation; @BindView(R.id.btn_confirm) Button btnCon...
2018-08-12 20:34:35
147
原创 获取当前对象 App
需要上下文的时候 可以调用 App.getInstance的方法得到;public class App extends Application { private static App app; @Override public void onCreate() { super.onCreate(); app = this; }...
2018-08-12 20:29:42
403
原创 OKHttpUtil 带缓存工具类
implementation 'com.squareup.okhttp3:okhttp:3.6.0' implementation 'com.squareup.okio:okio:1.11.0' public class OKHttpUtil { public static OKHttpUtil instance; public OkHttpClient o...
2018-08-10 21:06:06
590
原创 OkHttp的简单实现
首先我们先导入OkHttp的两条依赖implementation 'com.squareup.okhttp3:okhttp:3.6.0'implementation 'com.squareup.okio:okio:1.11.0'为救急写个简单博客。get 请求:因为是同步请求,需要另开一条子线程new Thread(){ @Override public ...
2018-08-10 11:25:50
727
原创 MVP初学者
先定义接口的base类 base类里实现M,V,P的三个接口 ----推荐接口名 Imode Iview IPresenter实现mvp的三个实体类 -----推荐类名 IModelImpl,PresenterlImpl 使mvp建立连接 在V层的实体里实力话得到PresenterlImp的实体类 向上转型得到Presenter的父类(接口类) 之后将V层的类对象传递到V层里 ...
2018-08-08 19:49:21
174
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人