- 博客(28)
- 收藏
- 关注

原创 BottomTabBar实现底部导航页和滑动
//依赖 implementation 'com.hjm:BottomTabBar:1.1.3'//因为比较简单所以直接上布局<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.co...
2018-12-10 19:04:59
470

原创 recycleview多条目展示
//添加依赖 //Recyclerview是listview的升级版 implementation 'com.android.support:recyclerview-v7:28.0.0' //okhttp implementation 'com.squareup.okhttp3:okhttp:3.10.0' //Glide请求网络图片 implement...
2018-11-30 20:13:26
938
原创 引导页跳转
//引导也布局<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android...
2018-12-26 20:58:09
508
原创 eventbus传值
//依赖 implementation 'org.greenrobot:eventbus:3.0.0'<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://s...
2018-12-20 10:00:22
253
原创 retrofit + rxjava 网络请求展示数据
//依赖 //retrofit加上gson解析 implementation 'com.squareup.retrofit2:converter-gson:2.0.0-beta4' //retrofit 和 rxjava结合 implementation 'com.squareup.retrofit2:adapter-rxjava:2.0.1' //recycl...
2018-12-19 14:09:29
281
原创 retrofit+xrecycleview展示数据
//依赖 //缓解冲突 implementation 'com.android.support:design:28.0.0' //xrecycleview implementation 'com.jcodecraeer:xrecyclerview:1.5.9' implementation 'com.facebook.fresco:fresco:0.14.1' ...
2018-12-09 19:29:45
422
原创 滑动 图片设置为高斯模糊效果
//效果前//效果后//在Bulid里面加入这两句话defaultConfig { renderscriptTargetApi 18 renderscriptSupportModeEnabled true }//布局<?xml version="1.0" encoding="utf-8"?><LinearLayout...
2018-11-29 09:53:33
409
原创 fresco图片框架简单使用
//fresco基础依赖 implementation 'com.facebook.fresco:fresco:0.14.1' //播放gif图 (如果用不到gif图就不用导入依赖) implementation 'com.facebook.fresco:animated-gif:0.14.1'//fresco 的弊端就是宽和高不能设置为wrap_conte...
2018-11-27 20:02:37
324
原创 MVP+分类
//导入依赖 //Recyclerview是listview的升级版 implementation 'com.android.support:recyclerview-v7:28.0.0' //okhttp implementation 'com.squareup.okhttp3:okhttp:3.10.0' //Glide请求网络图片 implemen...
2018-11-22 19:47:32
281
原创 fragment+购物车分类
//导入依赖 //Recyclerview是listview的升级版 implementation 'com.android.support:recyclerview-v7:28.0.0' //okhttp implementation 'com.squareup.okhttp3:okhttp:3.10.0' //Glide请求网络图片 implem...
2018-11-22 14:23:06
618
原创 Android使用WebView加载网页及数据
//先看一下效果//添加权限<uses-permission android:name="android.permission.INTERNET"/>//布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/.
2018-11-21 14:12:25
2271
原创 商城购物车的实现+MVP
先看看效果图//首先要导入我们需要用到的依赖 //okhttp3依赖 implementation 'com.squareup.okhttp3:okhttp:3.10.0' //gilde获取图片依赖 implementation 'com.github.bumptech.glide:glide:3.7.0' //解析数据gson implem...
2018-11-21 13:58:14
419
1
原创 RecyclerView+OKHttp+MVP网络数据请求,删除条目
//首先添加依赖 //Recyclerview是listview的升级版 implementation 'com.android.support:recyclerview-v7:28.0.0' //okhttp implementation 'com.squareup.okhttp3:okhttp:3.10.0' //请求网络图片 implementat...
2018-11-17 09:29:57
295
原创 Umeng第三方登录
//1.在清单文件进行配置&amp;amp;amp;amp;amp;amp;amp;lt;?xml version=&amp;amp;amp;amp;amp;amp;quot;1.0&amp;amp;amp;amp;amp;amp;quot; encoding=&amp;amp;amp;amp;amp;amp;quot;utf-8&amp;amp;amp;amp;amp;amp;quot;?&amp;am
2018-11-15 18:57:35
982
原创 属性动画
首先我们要在res下创建一个包 animator把 set改成 objectanimator&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;objectAnimator xmlns:android="http://schemas.android.com/apk/res/android&quo
2018-11-14 19:40:26
249
原创 okhttp+Banner实现无限轮播
//首先要添加第三方依赖(我studio版本3.0) //banner版本 implementation 'com.youth.banner:banner:1.4.9' //图片Glide implementation 'com.github.bumptech.glide:glide:3.7.0' //http3 implementation ...
2018-11-13 09:53:00
364
原创 MVP框架登录展示数据
//清单文件<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.exampl
2018-11-11 19:25:42
261
原创 使用MVP实现扫描二维码,生成二维码
//实现二维码首先要导入依赖implementation 'cn.yipianfengye.android:zxing-library:2.2'创建一个类继承application中进行初始化(清单文件要注册)public class App extends Application { @Override public void onCreate() { ...
2018-11-09 20:33:05
277
原创 简单跑马灯
//简单跑马灯 只在布局中添加属性就行<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://sch...
2018-11-09 09:25:10
196
原创 幸运转盘
//布局&amp;amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;amp;gt;&amp;amp;lt;android.support.constraint.ConstraintLayout xmlns:android=&amp;quot;http:/
2018-11-04 18:55:35
392
原创 ToolBar使用
布局 &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&amp;lt;android.support.constraint.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/andr
2018-11-04 18:52:46
199
原创 防今日头条案例
//最外层的布局 <?xml version="1.0" encoding="utf-8"?><android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/...
2018-10-25 19:28:22
257
原创 判断网络
判断有没有网络if判断没有网络进行吐司 if(!HaveNetWork()) { Toast.makeText(getActivity(), "没有网络", Toast.LENGTH_SHORT).show(); }else{ //另一种情况就是有网进行请求数据 String Urlwith = path +page; ...
2018-10-25 14:32:24
196
原创 viewpager滑动实现二次跳转页面
布局<?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:tools...
2018-10-25 13:56:27
485
1
原创 Xlistview展示多条目+Imageloader
清单文件配置&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; package=&
2018-10-24 10:43:04
148
原创 提取工具类
提取工具类 private void LoadDate(int page) { final String path = "http://172.17.8.100/movieApi/movie/v1/findHotMovieList?page="+page+"&count=3"; String Urlwith = path+page; ...
2018-10-23 16:04:40
418
原创 Viewpager+Fragment嵌套Tablelayout+Xlistview下拉刷新+Imageloader
清单文件配置<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.lxzk"> <uses-permission android:n
2018-10-23 10:22:28
211
原创 侧拉框+Xlist下拉加载数据+跳转activity
添加依赖 implementation 'com.android.support:support-v13:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:design:28.0.0'布局文件&amp;amp;lt;?xml versio...
2018-10-20 10:54:15
361
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人