- 博客(14)
- 收藏
- 关注
原创 仿京东首页小分类
依赖 implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.5.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.android.su...
2018-08-23 20:50:29 332
原创 Banner轮播图(网络接口实现)
依赖 implementation 'com.youth.banner:banner:1.4.10' implementation 'com.github.bumptech.glide:glide:3.8.0' implementation 'me.imid.swipebacklayout.lib:library:1.1.0' xml布局 <com.youth.banner.B...
2018-08-23 20:34:38 1779
原创 数据展示+传值+存数据库
用到的依赖 大build classpath 'org.greenrobot:greendao-gradle-plugin:3.0.0' implementation 'com.facebook.fresco:fresco:1.2.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.squareup...
2018-08-05 21:43:40 512
原创 购物车
1.先定义bean类 (展示两个数据) public class Seller { public String sellerName; public int sellerid; public List<Product> list; public boolean isCheck; } public class Product { pu...
2018-07-28 16:27:46 195
原创 MVP+OK+Xrecyclerview
用到的依赖 implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.android.support:recyclerview-v7:28.0.0-alpha3' implementation('com.jcod...
2018-07-28 16:07:04 223
原创 搜索框+流式布局
流式布局依赖 implementation 'com.zhy:flowlayout-lib:1.0.3' 1.xml布局文件 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"...
2018-07-28 15:48:29 706
原创 MVP+okhttp+recyclerview
要用的依赖 implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.android.support:recyclerview-v7:28.0.0-alpha3' 要加权限 <uses-permiss...
2018-07-22 21:08:17 199
原创 MVP模式
1.Model层 1》定义bean类 public void Shop(){ public double bargainPrice; public String createtime; public String detailUrl; public String images; public int itemtype; public in...
2018-07-15 20:31:46 203
原创 自定义view画圆+倒计时跳转
1.创建一个attrs,定义属性<?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="CountDownView"> <attr name="CountDownTime" format="integer&qu
2018-07-08 21:05:32 230
原创 横向标题滑动和频道管理
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_par
2018-06-28 17:05:06 374
原创 Banner(图片轮播)框架的使用
1.Gridle,Banner文件添加: compile 'com.youth.banner:banner:1.4.9' //最新版本compile 'com.github.bumptech.glide:glide:3.7.0'compile 'jp.wasabeef:glide-transformations:1.0.6'2.AndroidManifest.xml添加权限<uses-pe...
2018-06-28 16:48:30 274
原创 PullToRefreshListView上拉刷新下拉加载
导入依赖compile 'com.github.userswlwork:pull-to-refresh:1.0.0' xmlns:ptr="http://schemas.android.com/apk/res-auto" 命名的控件 ptr:ptrDrawable="@drawable/default_ptr_flip":刷新时显示的图片 ptr:pt...
2018-06-26 16:55:45 201
原创 ViewPager+holder自动轮播图片
1.xml<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_
2018-06-24 19:57:30 344
原创 HorizontalScrollView标题滑动
1.写在xml<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tool...
2018-06-24 19:41:49 193
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人