- 博客(93)
- 收藏
- 关注
原创 适配器
购物商品:bean类:public class GouWuDataBean implements Serializable { private int commodityId; private String commodityName; private int count; private String pic; private double pri...
2019-12-24 11:51:28
205
原创 Zhou-Kao2
apiservice:布局:<?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-aut...
2019-12-07 14:45:48
200
原创 工具类+apiservice
public class Refiut { public static Refiut refiut; public Retrofit retrofit; private Refiut() { retrofit = new Retrofit.Builder() .baseUrl("http://172.17.8.100/smal...
2019-11-24 20:52:35
210
原创 fenlei+gouwuche
分类左侧列表适配器:public class LeftAdapter extends RecyclerView.Adapter<LeftAdapter.ViewHolder> { public List<LeftDataBean> list=new ArrayList<>(); public Context context; pu...
2019-11-24 19:59:28
169
原创 retrofit+多条目
布局:activity_main:<?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" ...
2019-11-10 20:10:51
258
原创 二维码
package com.bw.qrcode.demo;import android.content.ContentResolver;import android.content.Intent;import android.database.Cursor;import android.graphics.Bitmap;import android.graphics.BitmapFacto...
2019-11-04 20:54:02
193
原创 okhttp封装
/** * 请求头拦截器,用于添加请求头 */public class HeardInterceptor implements Interceptor { @NotNull @Override public Response intercept(@NotNull Chain chain) throws IOException { //从拦截器链中获取...
2019-11-04 20:48:31
140
原创 多图上传
第一步:根目录maven { url "https://jitpack.io" }//1、快速适配器classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'//1、Greendao第二步:子目录apply plugin: 'org.greenrobot.greendao'//2、Greendao插件//3、Greendao存...
2019-09-22 20:35:15
206
原创 购物车
第一步:根目录加依赖:第二步:子目录加依赖:第三步:记住加网络权限INTERNET;第四步:data包下的类: retrofitmanager类:public class RetrofitManager { public static final String SHOPPINGCART = "http://blog.zhaoliang5156.c...
2019-09-17 11:38:16
164
原创 订单
一、创建订单需要的依赖:implementation 'com.android.support:design:28.0.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.github.bumptech.glide:glide:4.9.0' implementation 'com...
2019-09-15 17:36:18
215
原创 二级联动
在drawable里边写:shape.xml<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"> <stroke android:width="2dp" android:color="#d4d4d4"&...
2019-09-08 20:10:50
198
原创 购物车布局
<?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" xmlns:tools="http:...
2019-08-28 08:07:39
156
原创 retrofit工具类
public class OkhttpUtils { private static OkhttpUtils mOkhttpUtils = null; private final OkHttpClient mOkHttpClient; private Handler mHandler = new Handler(Looper.myLooper()); publi...
2019-08-27 20:12:19
151
原创 加载首页、我的
布局:<?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" xmlns:tools="...
2019-06-03 12:03:40
132
原创 多条目
导依赖: implementation 'com.android.support:design:28.0.0' implementation 'com.android.volley:volley:1.1.1' implementation 'com.github.bumptech.glide:glide:4.9.0' implementation 'com.googl...
2019-06-02 20:57:40
125
原创 volley工具类
package stsfan.com.mvpdome.net;import android.content.Context;import android.net.ConnectivityManager;import android.net.NetworkInfo;import com.android.volley.AuthFailureError;import com.androi...
2019-06-01 16:40:57
195
原创 赵小妞
依赖:implementation 'io.janusproject.guava:guava:19.0.0' implementation 'com.android.support:design:27.1.1' implementation 'com.github.bumptech.glide:glide:4.9.0' implementation 'com.goog...
2019-05-12 22:25:42
185
原创 流失布局+动画+折线图
布局:<?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" xmlns:tools="h...
2019-05-06 09:45:56
156
原创 工具类+契约类
工具类:package com.example.wuyizuoye.util;import com.android.volley.Request;import com.android.volley.Response;import com.android.volley.VolleyError;import com.android.volley.toolbox.StringRequest...
2019-05-06 09:38:34
199
原创 自定义view属性
工具类:package com.example.littleup.util;import com.android.volley.AuthFailureError;import com.android.volley.Request;import com.android.volley.Response;import com.android.volley.VolleyError;imp...
2019-04-26 18:06:30
324
原创 多条目+展示+轮播
网络权限:<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android...
2019-04-21 17:27:44
204
原创 denglu+zhanshi 布局
登录、注册布局:<?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" xmlns:to...
2019-04-14 15:03:17
102
原创 denglu+展示activity
MainActivity:package com.baway.firstweek;import android.content.Intent;import android.content.SharedPreferences;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import...
2019-04-14 14:59:23
159
原创 MVP+契约
LoginContract:package com.baway.firstweek.mvp;import com.baway.firstweek.MainActivity;public interface LoginContract { //Iview interface ILoginView{ void getPreData(String data)...
2019-04-14 14:51:33
163
原创 HTTPUilConnection工具类
package com.baway.firstweek.net;import android.os.AsyncTask;import android.text.TextUtils;import com.google.common.io.ByteStreams;import java.io.InputStream;import java.net.HttpURLConnection;...
2019-04-14 14:39:02
224
原创 另一种展示+轮播
第一步:网络权限第二步:依赖: implementation 'com.youth.banner:banner:1.4.9' implementation 'com.github.bumptech.glide:glide:4.9.0' implementation 'com.google.code.gson:gson:2.8.5' implementation ...
2019-03-31 15:41:10
122
原创 week03轮播+ MVP展示:
加依赖: implementation 'com.youth.banner:banner:1.4.9' implementation 'com.squareup.okhttp3:okhttp:3.7.0' implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.gi...
2019-03-31 15:27:47
120
原创 闪屏:
在values里边建一个attrs.xml布局:<?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="MyTextView2"> <attr name="myText" format="string"/> &l...
2019-03-23 09:19:03
207
原创 mvp展示
//Contract接口public interface ContarctIntface { //view层商品接口 public interface ProductIntface{ public void ShowDisplay(Object obj); } //p层的接口 public interface PresenterIntf...
2019-03-17 20:38:49
147
原创 MVP框架+登录+注册+展示
记住写权限:<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bwie.dome3"> <uses-permission android:name
2019-03-17 19:02:07
254
原创 MVP框架+数据解析
先写布局: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-a...
2019-03-14 14:54:22
209
原创 今日头条
DAO层:public class SqlDao { private MyHelper myHelper; private String table="nows"; public SqlDao(Context context){ myHelper = new MyHelper(context); } //添加数据库 public...
2019-03-07 20:55:45
215
原创 数据库+上拉下拉+轮播+fragment切换+抽基类三周练习
一、布局:activity_main.xml、fragment_my.xml、fragment_shou.xml、item_layout.xml代码如下:<?xml version="1.0" encoding="utf-8"?><android.support.v4.widget.DrawerLayout xmlns:android="http://schemas....
2019-03-01 14:33:10
125
原创 2遍周考2模拟
一、布局:1.1、activity_main.xml布局<?xml version="1.0" encoding="utf-8"?><android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http:...
2019-02-25 14:53:28
126
原创 2遍周考练习
1.页面切换布局代码:<?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" xmlns...
2019-02-17 19:17:51
159
原创 倒计时
1.布局:<?xml version="1.0" encoding="utf-8"?><LinearLayout android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.a
2019-01-18 12:05:59
136
原创 第三周周考:
展示效果:展示代码如下:布局:1.activity_main.xml:<?xml version="1.0" encoding="utf-8"?><LinearLayout android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/a...
2019-01-15 09:40:48
212
原创 项目实战模拟周考2:
第一步、先在res文件下drawable里边写sele_r.xml,代码如下:<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked=".
2019-01-14 17:05:27
474
原创 ImageLogder
App类:package com.qy.day08_imageloader;import android.app.Application;import android.os.Environment;import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiscCache;import com.nost...
2019-01-14 15:40:05
146
原创 我的工具类:
工具类 package com.qy.day02_asynctask;import android.content.Context;import android.net.ConnectivityManager;import android.net.NetworkInfo;import android.os.AsyncTask;import java.io.BufferedRea...
2019-01-14 15:03:45
134
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人