3 共产主义接班人001

尚未进行身份认证

我要认证

暂无相关简介

等级
TA的排名 12w+

RetrofitFactory封装类

public class RetrofitFactory { //使全局就一个OKHttpClient对象 public static OkHttpClient okHttpClient = new OkHttpClient.Builder()// .cookieJar(new CookiesManager()) .connectTi

2018-01-05 20:24:17

mvp+rxjava+retrofit2封装的依赖

/*5.0新控件的依赖*/    compile 'com.android.support:design:26.0.0-alpha1'    /*RxJava与RxAndroid的依赖*/    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'    compile 'io.reactivex.rxjava2:rxjava:2.1.0

2018-01-05 18:58:21

Retrofit2带gson的依赖

//Retrofit2的依赖compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'

2017-12-29 13:41:59

app带证书验证的方法和okhttp日志拦截器类

/** * app带证书验证的方法,使用是修改一下zhaoapi_server.cer即可,其他都是固定的模式,直接拷贝 */public OkHttpClient setCard(String zhenshu) { //修改 OkHttpClient.Builder builder = new OkHttpClient.Builder(); try {

2017-12-28 13:57:16

简单的组合动画

imageView = (ImageView) findViewById(R.id.imageView);//动画//位移ObjectAnimator animator = ObjectAnimator.ofFloat(imageView, "translationY", 0f, 400f);//旋转ObjectAnimator animator1 = ObjectAnimator.of

2017-12-21 09:52:25

okhttp循环请求网络

while (w lisck.size()) { Log.d("---------",w+"==="); if (pp) { pp = false; if (wlisck.size()) { Map map = new HashMap<>(); map.put("uid", uid);

2017-12-19 13:48:36

CartExpanableListview自适应有多少数据就多长

public class CartExpanableListview extends ExpandableListView { public CartExpanableListview(Context context) { super(context); } public CartExpanableListview(Context context, Att

2017-12-17 18:59:06

带拦截器的okhttp封装类

/**     * 懒汉 安全 加同步     * 私有的静态成员变量 只声明不创建     * 私有的构造方法     * 提供返回实例的静态方法     */    private static OkHttpClient okHttpClient = null;    private OkHttp3Util() {    }    public

2017-12-16 08:44:06

公共参数拦截器

/**     * 公共参数拦截器     */    private static class CommonParamsInterceptor implements Interceptor{        //拦截的方法        @Override        public Response intercept(Chain chain) throws IOEx

2017-12-16 08:41:48

OkHttp3Util

/**     * 懒汉 安全 加同步     * 私有的静态成员变量 只声明不创建     * 私有的构造方法     * 提供返回实例的静态方法     */    private static OkHttpClient okHttpClient = null;    private OkHttp3Util() {    }    public

2017-12-09 08:55:46

android自定义view小圆球指哪跑哪

private int cx = 100;    private int cy = 100;    /**     * Canvas canvas画布.....paint画笔     * @param canvas     */    @Override    protected void onDraw(Canvas canvas) {        super.o

2017-11-30 20:28:52

Android自定义view画中国国旗

Paint mPaint=new Paint();mPaint.setAntiAlias(true);mPaint.setColor(Color.RED);mPaint.setStrokeWidth(2);mPaint.setStyle(Paint.Style.FILL_AND_STROKE);canvas.drawRect(0,0,getMeasuredWidth(),getMeasu

2017-11-30 20:20:48

Canvas画太极图

int width=360; private Paint paint; private RectF rectf; public TaijiTu(Context context) { super(context); init(); } public TaijiTu(Context context, @Nullable A

2017-11-30 14:23:28

android动态权限

//A.检查用户是否已经允许了权限....PackageManager.PERMISSION_GRANTED代表的是用户已经允许        if (ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMIS

2017-11-29 14:32:56

OkHttpClient post的使用

OkHttpClient okHttpClient=new OkHttpClient();FormBody formboby=new FormBody.Builder() .add("mobile", "15715317583") .add("password", "123456") .build();Request builder = new Request

2017-11-29 14:30:39

OkHttpClient 上传文件

OkHttpClient okHttpClient=new OkHttpClient();MediaType parse = MediaType.parse("text/x-markdown;charset=utf-8");File file = new File(Environment.getExternalStorageDirectory(),"note01.md");Request b

2017-11-29 14:29:26

okhttp的依赖

compile 'com.squareup.okhttp3:okhttp:3.6.0'compile 'com.squareup.okio:okio:1.11.0'

2017-11-29 13:44:00

OkHttpClient 的get使用

OkHttpClient okHttpClient =new OkHttpClient();Request builder = new Request.Builder() .url("https://www.zhaoapi.cn/ad/getAd") .build();Call call = okHttpClient.newCall( builder);cal

2017-11-29 13:22:36

RecyclerView指定布局管理器

//listviewrecyclerView.setLayoutManager(new LinearLayoutManager(FirstActivity.this,LinearLayoutManager.VERTICAL,false));//GridView recyclerView.setLayoutManager(new GridLayoutManager(FirstActi

2017-11-27 18:46:31

批量删除所在行

//批量删除                $scope.delAll=function() {                  $("input[name='test']:checked").each(function() { // 遍历选中的checkbox                                    $(this).parent().paren

2017-11-19 19:50:53

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!