自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(75)
  • 收藏
  • 关注

原创 设置默认地址

设置默认地址在适配器里写这个方法修改并再次查询地址后调用这个方法//改变默认值 public void setAllunCheck(int position) { int size = list.size(); for (int i=0;i<size;i++){ if(i==position){ ...

2019-01-20 11:51:42 2316

原创 日期选择器

https://blog.csdn.net/m0_37761307/article/details/78559715

2019-01-20 11:46:43 153

原创 Retrofit+RxJava+Okhttp

BaseApis:/** * * @详情 RXjava的被观察者 * * @创建日期 2018/12/29 15:00 * */public interface ObservedApis { @GET Observable<ResponseBody> get(@Url String url); @POST Observable<...

2019-01-20 11:42:09 197

原创 照相与相册裁剪 bitmap转file

private String path=Environment.getExternalStorageDirectory()+"/header_image.png";Intent intent_takePhoto=new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (hasSdcard()){//判断SD卡是否可用 ...

2019-01-20 11:20:47 146

原创 视频播放

https://blog.csdn.net/qq_42775434/article/details/86498932

2019-01-20 11:14:33 92

原创 多图文上传

https://www.jianshu.com/p/a615773c2401

2019-01-18 18:59:12 257

原创 图片上传

https://www.jianshu.com/p/6ccdec4f3dd2

2019-01-17 21:13:41 107

原创 简单的流式布局

https://blog.csdn.net/qq_43053718/article/details/85943970

2019-01-17 16:56:47 125

原创 商家适配器

public class JiaAdapter extends RecyclerView.Adapter<JiaAdapter.ViewHolder> {private List<ShopBean.DataBean> list;private Context context;public JiaAdapter(Context context) { this.c...

2019-01-14 00:32:51 95

原创 webview

webView.loadDataWithBaseURL(null,result.getDetails(),“text/html”,“utf-8”,null);

2019-01-14 00:24:27 118

原创 吸附效果

自定义RecyclerView:public class MyRecyclerView extends RecyclerView { private BaseDecoration mDecoration; public MyRecyclerView(Context context) { super(context); } public MyR...

2019-01-13 18:46:25 356

原创 Android 内存泄漏分析利器——leakcanary

https://www.cnblogs.com/fuyaozhishang/p/7753013.html

2019-01-12 09:11:33 147

原创 时间转换格式

String times = new SimpleDateFormat("yyyy-MM-dd").format( new java.util.Date(item.getOrderTime())); task_text_time.setText(times);

2019-01-11 13:52:32 210

原创 第二个网络请求

RetrofitUtils:public class RetrofitUtils { private static RetrofitUtils instance; private OkHttpClient client; private final String BASE_URL="http://172.17.8.100/small/"; private Bas...

2019-01-01 23:31:34 98

原创 Retrofit

BaseApis:public interface BaseApis<T> { @GET Observable<ResponseBody> get(@Url String url); @POST Observable<ResponseBody> post(@Url String url, @QueryMap Map<St...

2019-01-01 15:31:58 110

原创 递归截取字符串

//递归截取字符串public void cc(String images){//找到 | 的位置int index=images.indexOf("|");if (index>=0){String pian=images.substring(0,index);list.add(pian);cc(images.substring(index+1,images.length())...

2019-01-01 14:41:27 514

原创 需要用到的自定义控件

https://www.jianshu.com/p/c4f9f5ccc0e1

2018-12-28 16:43:02 120

原创 Butterknife

Butterknife:1.使用前首先是在项目的Project的build.gradle的dependencies{ }中加入一句话:dependencies {classpath 'com.android.tools.build:gradle:3.0.1'//Butterknifeclasspath 'com.jakewharton:butterknife-gradle-plugin:...

2018-12-28 08:17:53 179

原创 自定义注解

https://blog.csdn.net/missgentlemen/article/details/79159743

2018-12-26 08:19:04 93

原创 反射机制

https://www.jianshu.com/p/7fdb8c828602

2018-12-25 13:50:42 90

原创 兴趣树

自定义View:CustomView:public class CustomView extends LinearLayout { private Paint mPaint; public CustomView(Context context) { super(context); init(); } public CustomV...

2018-12-21 10:37:50 129

原创 Recyclerview删除子条目的属性动画

在Adapter里写一个删除的方法Adapter: public void del(final View view , final int position){ final float f = view.getX(); ObjectAnimator animator=ObjectAnimator.ofFloat(view,"translationX",0...

2018-12-21 10:24:08 663

原创 高德地图简单的逆定理编码

具体的参考高德开发平台Activity:public class MainActivity extends AppCompatActivity implements GeocodeSearch.OnGeocodeSearchListener { private MapView mMapView; AMap aMap; MyLocationStyle myLocatio...

2018-12-21 10:22:10 323

原创 简单的自定义进度条

自定义View:public class Jindutiao extends View { private Context context; private Paint paint; public Jindutiao(Context context) { super(context); this.context=context; ...

2018-12-21 09:33:51 71

原创 二级联动

Activity:/** * 二级联动 */public class ShopTypeActivity extends AppCompatActivity implements IView { private IPresenterImpl mIPresenterImpl; private ShopTypeAdapter mShopTypeAdapter; priva...

2018-12-21 09:26:49 68

原创 线性和网格Recyclerview的切换

Activity:public class MainActivity extends AppCompatActivity implements IView, View.OnClickListener { private static final int SPAN_COUNT = 2; private IPresenterImpl mIPresenterImpl; pri...

2018-12-20 19:42:43 340

原创 自定义拦截器

自定义View:CustomIn:public class CustomIn implements Interceptor { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); Respo...

2018-12-20 19:13:36 89

原创 处理OkHttp的异常

OkUtil:public class OkUtil { private static OkUtil instance; private OkHttpClient mClient; private Handler handler=new Handler(Looper.getMainLooper()); public static OkUtil getInstanc...

2018-12-20 19:10:14 3149

原创 购物车的简单逻辑

Activity:public class ShopCarActivity extends AppCompatActivity implements IView, View.OnClickListener { private ShopAdapter mShopAdapter; private CheckBox mIvCircle; private List<Shop...

2018-12-20 19:07:18 131

原创 属性动画

activity_animation.xml:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:lay...

2018-12-14 21:09:03 74

原创 动画递归

activity_main.xml:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" ...

2018-12-12 19:38:33 381

原创 瀑布流布局Recyclerview

导依赖: implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0' implementation 'com.google.code.gson:gson:2.8.5' implementatio...

2018-12-11 20:48:33 138

原创 网格布局Recyclerview

导依赖: implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0' implementation 'com.google.code.gson:gson:2.8.5' implementatio...

2018-12-11 20:47:53 345

原创 线性布局RecyclerView

导依赖: implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0' implementation 'com.google.code.gson:gson:2.8.5' implementatio...

2018-12-11 20:47:20 266

原创 OKHttp

public class OkHttpUtils {private static volatile OkHttpUtils mInstance;private OkHttpClient mClient;private Handler mHandler = new Handler(Looper.getMainLooper());/** * 第一步,写一个单例,这里用的懒汉式,也可以使用...

2018-12-10 21:06:14 455

原创 第三方登录

AndroidManifest.xml:<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.umeng.soexample"> <!-- 1.添加以下权限

2018-12-09 20:18:23 164

原创 记住密码和自动登录

activity_main.xml:<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas...

2018-12-09 20:14:44 451

原创 bugly

导包:implementation 'com.tencent.bugly:crashreport:latest.release'权限: <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.pe...

2018-12-06 20:55:32 446

原创 异常捕获

UnCatchHandler:/** * 全局捕获异常类,实现Thread.UncaughtExceptionHandler * @author hasee */public class UnCatchHandler implements Thread.UncaughtExceptionHandler { private static UnCatchHandler mUnCatc...

2018-12-06 20:53:29 163

原创 二维码

导包:build:implementation 'cn.bingoogolapple:bga-qrcode-zxing:1.3.4'activity_main.xml:<?xml version="1.0" encoding="utf-8"?><an

2018-12-03 20:28:48 148

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除