implementation ‘com.squareup.okhttp3:okhttp:3.2.0’
implementation ‘com.squareup.okio:okio:1.7.0’
implementation ‘com.squareup.okhttp3:logging-interceptor:3.4.1’
implementation ‘com.android.support:recyclerview-v7:28.+’
implementation ‘com.github.bumptech.glide:glide:4.9.0’
implementation ‘com.google.code.gson:gson:2.8.5’
导的依赖
分包
封装bean类
OkHttpUtils
TelUtils
正则表达式
String telRegex = “^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$”;// "[1]“代表下一位为数字可以是几,”[0-9]“代表可以为0-9中的一个,”[5,7,9]"表示可以是5,7,9中的任意一位,[^4]表示除4以外的任何一个,\d{9}"代表后面是可以是0~9的数字,有9位。
登录
接口
path = “http://172.17.8.100/small/user/v1/login”;
注册
接口
final String url = “http://172.17.8.100/small/user/v1/register”;
展示
接口
url = “http://172.17.8.100/small/commodity/v1/findCommodityByKeyword?page=1&count=25&keyword=板鞋”;
Mainactivity
布局
SearchHistroyView
注册
布局
显示页面
item布局
Adapter
;