自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 收藏
  • 关注

原创 TabLayout的简单使用

导入依赖implementation 'com.android.support:design:26.1.0'写布局<android.support.design.widget.TabLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"...

2018-10-31 16:12:13 179

原创 mvp p层的抽取 v层也需要写一个IBaseview让所有的view接口继承他 里面可以什么都不用写

public class BasePresenter<V extends IBaseView>{ private V iv; public void attachView(V v){ this.iv = v; } public void dettachView(){ this.iv = null; } ...

2018-10-22 08:07:51 861

原创 自定义view实现流式布局

创建一个类继承viewGrouppublic class LiuShi extends ViewGroup { public LiuShi(Context context) { super(context,null); } public LiuShi(Context context, AttributeSet attrs) { sup...

2018-10-20 14:25:48 225

原创 recyclerview自定义点击事件的接口回调

public interface OnItemClickLisenter{ void onItemClick(int postion);}public void setOnItemClickListener(OnItemClickLisenter onItemClickListener){ this.onItemClickLisenter = onItemClickLis...

2018-10-18 20:03:27 467

原创 底部导航栏实现简单方法BottomTabBar

//导入依赖implementation 'com.hjm:BottomTabBar:1.1.1'//布局文件<com.hjm.bottomtabbar.BottomTabBar android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id...

2018-10-11 19:12:41 212

原创 搜索框背景圆角图自绘

第二步第三步<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius=

2018-10-11 19:11:49 232

原创 RxJava的简单使用

导入依赖implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'implementation 'io.reactivex.rxjava2:rxjava:2.0.2'implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'写一个类类里写重复的接口前半部分public...

2018-10-10 20:22:44 147

原创 retrofit的简单使用(请求网络数据)

倒入依赖implementation 'com.squareup.retrofit2:retrofit:2.0.2'implementation 'com.squareup.okhttp3:okhttp:3.1.2'implementation 'com.google.code.gson:gson:2.2.4'implementation 'com.squareup.retrofit2...

2018-10-10 18:50:52 305

原创 Butterknife 的简单使用

添加依赖implementation 'com.jakewharton:butterknife:8.5.1'annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'自定义一个activity继承AppCompatActivity  这个类需要时抽象类(abstract)public abstract cl...

2018-09-29 19:25:03 175

原创 banner的使用 轮播图

build.gradle文件中写依赖compile 'com.youth.banner:banner:1.4.10'compile 'com.github.bumptech.glide:glide:4.0.0'布局中的代码<com.youth.banner.Banner xmlns:app="http://schemas.android.com/apk/res-au...

2018-09-28 09:13:13 198

原创 Fresco图片加载框架的简单使用

首先应该添加网络权限添加依赖普通图片的依赖implementation 'com.facebook.fresco:fresco:+'动图的依赖implementation 'com.facebook.fresco:animated-gif:+'布局文件中的代码写控件<com.facebook.drawee.view.SimpleDraweeView andr...

2018-09-27 18:58:46 184

原创 购物车的双层recyclerview实现全选功能

main_check是最外层的复选框main_check.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(main_check.isChecked()){ for (int i = 0; i <da...

2018-09-24 11:00:33 546

原创 日志拦截器

 /* 日志拦截器 */        HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();        interceptor.setLevel(HttpLoggingInterceptor.Level.BODY); 

2018-09-21 13:39:49 177

原创 集成高德地图

 在浏览器搜索高德开放平台首先,声明权限<!--允许程序打开网络套接字--><uses-permission android:name="android.permission.INTERNET" /><!--允许程序设置内置sd卡的写权限--><uses-permission android:name="android.permis...

2018-09-19 14:56:59 443

原创 Glide的简单使用

导入依赖implementation 'com.github.bumptech.glide:glide:3.7.0'使用Glide.with(context).load(split[0]).into(holder.image);第一个参数是上下文 第二个参数是图片的地址 第三个参数是imageview...

2018-09-15 10:22:38 98

原创 xrecyclerview 的使用

依赖implementation 'com.jcodecraeer:xrecyclerview:1.3.2'布局文件 一个是首页的一个是适配器的布局<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" andr...

2018-09-13 14:57:10 525

原创 shape绘制圆角矩形

创建shape文件 shape文件中的代码<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#D3D3D3" /> &lt...

2018-09-12 09:23:23 627

原创 zxing实现二维码的扫描 和 二维码的生成

倒依赖implementation 'cn.yipianfengye.android:zxing-library:2.2' 权限<uses-permission android:name="android.permission.INTERNET"/><uses-permission android:name="android.permission.READ_...

2018-09-11 20:43:39 297

原创 友盟第三方集成qq

 在友盟中的操作 下载sdk下载好sdk后在代码中集成在studio中的lib文件中导入下载的sdk文件(一共三个jar包) 在studio中的drawable中导入sdk中的图片(所有图片) studio中的res文件中导入下图的文件 studio的value文件中导入添加一行依赖implementation 'com.umeng....

2018-09-11 09:13:48 306

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除