- 博客(19)
- 收藏
- 关注
转载 判断是Wifi联网,还是手机联网
try { ConnectivityManager manager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = manager.getActiveNetworkInfo(); if (info == null) { // ...
2018-12-06 13:28:01 580
原创 闪屏+侧滑+PullToRefreshListView+轮播+网页
依赖:implementation 'com.google.guava:guava:16.0.1'implementation 'com.google.code.gson:gson:2.2.4'包:implementation project(':imageloaderlibrary')implementation project(':pullToRefresh')刷新接口...
2018-11-22 19:37:35 170
转载 购物车+头像上传
接口:public interface Api { @GET("product/getCarts?uid=22535") Observable<ShoppingBean> getCart(); @GET("user/getUserInfo?uid=22535&token=BC254F7FC28567CDA7AB37C837057888") ...
2018-11-22 19:35:27 235
转载 头像上传
接口拼接:@Multipart@POST("file/upload")Observable<IconUpload> iconUpload(@Query("uid") String uid, @Query("token")String token, @Part MultipartBody.Part part);IconUploprivate String he...
2018-11-21 20:22:07 111
原创 接口回调
private OnItemClickListener onItemClickListener;public interface OnItemClickListener{ void onItemClick(int position);}public void setOnItemClickListener(OnItemClickListener onItemClickListener...
2018-11-08 20:00:51 90
原创 XrecyclerView上拉加载下拉刷新+RXjava+retrofit+fresco+MVP
依赖://XrecyclerView: compile 'com.jcodecraeer:xrecyclerview:1.5.9'//RXjava依赖: implementation 'io.reactivex.rxjava2:rxandroid:2.0.2' implementation 'io.reactivex.rxjava2:rxjava:2.0....
2018-11-08 10:09:52 177
原创 最简单的沉浸式
<!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPr...
2018-11-07 19:06:28 94
原创 京东秒杀
@SuppressLint("HandlerLeak") private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); if (msg...
2018-11-06 13:48:50 580
原创 fresco+recyclerView展示+MVP
public class Contant { public static final String BAUS_URI = "http://www.zhaoapi.cn/";}public interface Api { @GET("home/getHome") Call<Bean> tohome(); @GET("product/getPro...
2018-11-05 08:12:40 180
原创 fresco的简单使用
圆形图:Uri uri = Uri.parse("http://www.zhaoapi.cn/images/quarter/ad1.png");GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(getResources());RoundingParams params = Roun...
2018-11-03 10:07:36 127
原创 分类+购物车
封装:public class Httputils { public final Api api; public Httputils(){ OkHttpClient httpClient = new OkHttpClient.Builder() .addNetworkInterceptor(new LoggingInterc...
2018-10-25 21:02:34 235
原创 MVP+封装
封装:package com.example.jddemo.MVP.model;import java.io.IOException;import okhttp3.Interceptor;import okhttp3.OkHttpClient;import okhttp3.Request;import okhttp3.Response;import retrofit2.R...
2018-10-22 07:54:36 100
原创 购物车
依赖:implementation 'com.android.support:recyclerview-v7:27.1.1'implementation 'com.squareup.okhttp:okhttp:2.0.0'implementation 'com.google.code.gson:gson:2.2.4'implementation 'com.github.bumptech...
2018-09-24 21:47:25 129
原创 展示+定位+登录
1:需要的依赖:implementation 'com.android.support:support-v4:27.+'implementation 'com.android.support:recyclerview-v7:27.1.1'implementation 'com.jakewharton:butterknife:8.8.1'annotationProcessor 'com....
2018-09-17 07:36:43 96
原创 PullToRefreshListView刷新
需要导入的依赖:implementation 'com.google.code.gson:gson:2.2.4'implementation 'com.google.guava:guava:16.0.1'需要导入的包文件implementation project(':pullToRefresh')implementation project(':imageloaderli...
2018-08-19 20:09:05 490
原创 首次作品
第一步首页布局:<?xml version="1.0" encoding="utf-8"?><LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" xmlns
2018-08-05 19:40:44 139
原创 网页牛逼岔子
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no
2018-05-30 20:05:40 160
原创 类型
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script src="../libs/angular.min.js"></script> &
2018-05-29 20:06:37 129
原创 购物车
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <me
2018-05-21 13:47:49 91
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人