- 博客(14)
- 收藏
- 关注
原创 仿淘宝详情页 直接上代码
放淘宝详情页 直接上代码package com.example.liketitledemo;import android.content.Context;import android.graphics.Point;import android.util.AttributeSet;import android.view.WindowManager;import android.w...
2019-01-19 16:20:08
3651
原创 一个仿微博TextView 筛选,直接使用的工具类
一个仿微博TextView 筛选,直接使用的工具类 package com.example.textviewhtml;import android.content.Context;import android.graphics.Color;import android.text.Spannable;import android.text.SpannableString;impor...
2019-01-17 18:42:06
376
原创 解决Retrofit和RxJava 抛出异常报错问题
解决Retrofit和RxJava 抛出异常报错问题package com.dingtao.rrmmp.core.exception;public class ApiException extends Exception { private int code; private String displayMessage; public ApiException...
2019-01-01 19:43:20
1410
原创 经常使用的框架
/*retrofig 网络请求*/ implementation 'com.squareup.retrofit2:retrofit:2.5.0' /*okhttp 网络请求*/ implementation 'com.squareup.okhttp3:okhttp:3.12.1' /*rxjava*/ implementation 'io.reactive...
2018-12-27 18:57:49
198
原创 读取sd卡里的jar包
读取sd卡里的jar包并使用里面的类 button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String path = Environment.getExternalSt...
2018-12-27 08:21:54
161
原创 简单使用GreenDao框架
1导依赖库implementation 'org.greenrobot:greendao:3.2.2'implementation 'org.greenrobot:greendao-generator:3.2.2'2配置build.gradle注意是projectbuildscript { repositories { google() ...
2018-12-26 18:49:25
306
原创 自定义控件 流式布局
自定义控件 流式布局package com.example.layout;import android.content.Context;import android.content.res.TypedArray;import android.graphics.Canvas;import android.graphics.Color;import android.support....
2018-12-20 15:05:51
176
原创 RecyclerView嵌套实现购物车
1 导库implementation 'com.google.code.gson:gson:2.8.5'implementation 'com.squareup.okhttp3:okhttp:3.12.0'implementation 'com.github.bumptech.glide:glide:4.8.0'implementation 'com.android.support:r...
2018-12-19 10:48:22
355
原创 高德地图地位获取地址
高德地图地位获取地址高德地图开发平台地址:https://lbs.amap.com/1导入依赖库implementation 'com.amap.api:location:4.4.0' 2权限<!--用于进行网络定位--> <uses-permission android:name="android.permission.ACCESS_COAR...
2018-12-12 20:26:31
604
原创 MVP进阶及OKHttp上传图片
用MVP+OKHttp实现上传图片 需要添加的权限<uses-permission android:name="android.permission.INTERNET"/><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/><uses-permissio...
2018-12-12 14:46:09
311
原创 Android 控件 RecyclerView简单使用
Android 控件 RecyclerView简单使用1.导依赖库implementation 'com.android.support:recyclerview-v7:27.1.1'implementation 'com.github.bumptech.glide:glide:4.8.0'//图片2.布局<android.support.v7.widget.Recyc...
2018-12-10 19:38:56
322
原创 zxing生成二维码及解析二维码
ZXing生成二维码1.下载jarhttps://github.com/ZF520/QRCode/raw/master/zxing/bin/lib/zxing3.3.1.jar2.生成二维码的函数: private ImageView im1; //imageview图片 private int w,h; //图片宽度w,高度h //转换成...
2018-12-07 11:14:29
542
原创 全局捕获异常
要点:安卓的异常分为运行异常和编译异常XThread.UncaughtExceptionHandler 是 Java 虚拟机处理由于未捕获异常而导致程序停止运行的接口当一个线程由于未捕获异常而停止运行的时候,Java 虚拟机就会通过 Thread的getUncaughtExceptionHandler() 方法拿到当前 Thread 的 Thread.UncaughtExceptionHa...
2018-12-05 19:25:20
156
原创 Android Studio 基于Zxing开发二维码
Android Studio 基于Zxing开发二维码zxing是github上一个二维码处理开源项目,我们使用这个库来处理二维码如果你使用的是Android Studio,可以参考本文进行配置。并附一个小例子。首先在build.gradle(Moudle:app)中添加下列依赖:repositories { mavenCentral() maven { ...
2018-12-03 19:30:43
368
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人