- 博客(50)
- 收藏
- 关注
转载 Lint
什么是 LintLint 是Android Studio 提供的 代码扫描分析工具,它可以帮助我们发现代码结构/质量问题,同时提供一些解决方案,而且这个过程不需要我们手写测试用例。Lint 发现的每个问题都有描述信息和等级(和测试发现 bug 很相似),我们可以很方便地定位问题,同时按照严重程度进行解决。当然这个“严重程度”我们可以手动调节,有些原则问题不容侵犯,必须提升到 error,而有...
2019-05-10 23:38:37
879
原创 mvp+retrofit+okhttp 上传头像
依赖 implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0' implementation 'com.facebook.fresco:fresco:1.12.1' implementation '...
2019-05-04 20:07:47
231
原创 购物车bean类
//这里面添加东西了 private boolean isChecked; private boolean isChecked; private boolean isChecked; 总共添加三个 //如果是一级的 就添加两个package bwie.com.shop.bean;import java.io.Serializable;...
2019-03-07 17:02:17
185
原创 购物车的二级列表
第一步 导依赖第二步 mvp第三步写请求网络类 也就是 okhttp 或者 retrofit下面进入正题购物车会有商家 和商品 所以 我们要进行 嵌套商家的布局 就是 一个recycleview<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://sc...
2019-03-07 16:57:40
168
原创 json解析
package com.example.day14_gson;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.util.ArrayList;import com.exampl...
2019-03-07 11:40:35
77
原创 qq第三方登录以及信息的获取
清单文件千万别忘了 有一个 android:name=".app.MyApplication" &lt;activity android:name="com.tencent.tauth.AuthActivity" android:launchMode="singleTask" androi
2019-03-06 20:41:16
696
原创 地址存放
在这里插入代码片package com.bw.xiangmu.api;public class Api{ //http://172.17.8.100/small/order/verify/v1/syncShoppingCart public static final String BASE_URL="http://172.17.8.100/"; public stati...
2019-02-26 08:25:29
253
原创 布局
&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;android.support.v7.widget.CardView android:layout_height="wrap_content" android:layout_width="180dp"
2019-02-18 08:22:19
74
原创 适配器
package com.example.week1_moni.adapter;import android.content.Context;import android.support.annotation.NonNull;import android.support.v4.app.FragmentActivity;import android.support.v7.widget.Rec...
2019-02-17 21:52:00
78
原创 详情页面
package com.example.week1_moni;import android.net.Uri;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import android.util.Log;import android.widget.TextView;import andr...
2019-02-17 21:51:22
217
原创 greenDao的添加到数据库
public class Constants{ public static final String DB_NNAME=&quot;ying.db&quot;;}activity 存入数据库 并且 点击详情package com.example.week1_moni.fragment;import android.content.Intent;import android.os.Bu...
2019-02-17 20:56:40
126
原创 bean类 re GreenDao缓存
package com.example.week1_moni.bean;import org.greenrobot.greendao.annotation.Entity;import org.greenrobot.greendao.annotation.Id;import org.greenrobot.greendao.annotation.Unique;import org.green...
2019-02-17 20:54:12
115
原创 application工具类
public class MyApplication extends Application{ @Override public void onCreate() { super.onCreate(); Fresco.initialize(this); GreenUtils.getInstance().initGreenDao(thi...
2019-02-17 20:52:27
194
原创 refort
/***存放地址*/public class Api{ public static final String BASE_URL="http://172.17.8.100/"; public static final String SHOU=BASE_URL+"small/commodity/v1/findCommodityByKeyword";}/*** 请求方法...
2019-02-17 20:51:50
124
原创 greenDao封装
package com.example.week1_moni.utils;import android.content.Context;import android.database.sqlite.SQLiteDatabase;import com.example.greendao.bw.db.DaoMaster;import com.example.greendao.bw.db.Da...
2019-02-17 20:49:56
141
原创 高德地图
布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/
2019-01-20 09:42:58
141
原创 xrecycleview实现上拉刷新,下拉加载
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="wrap_
2019-01-20 08:47:07
161
原创 全局异常捕获
package bwie.com.shizhan2;import android.content.Context;import android.os.Looper;import android.util.Log;import android.widget.Toast;public class YiChangActivity implements Thread.UncaughtExce...
2019-01-13 20:03:53
94
原创 okhttp的在封装
package bwie.com.shizhan2.http;import android.os.Environment;import android.os.Handler;import android.util.Log;import android.widget.ScrollView;import com.google.gson.Gson;import java.io.File...
2019-01-13 19:33:08
86
原创 recycleview的线性,瀑布,网格布局的实现,以及条目的点击事件
布局<?xml version="1.0" encoding="utf-8"?><ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_conte
2019-01-13 19:31:55
263
原创 生成二维码
shengcheng = view.findViewById(R.id.shengcheng); shengcheng.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int...
2019-01-13 19:26:19
139
原创 扫描二维码
sao.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // 设置要扫描的条码类型,ONE_D_CODE_TYPES:一维码,QR_CODE_TYPES-二维码 ...
2019-01-13 19:16:24
188
原创 自定义标题栏以及点击事件
attr.xml<?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="TobBar"> <attr name="ltftBackGround" format="reference"/&
2019-01-13 18:57:43
535
原创 设置成圆形按钮
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false"> <shape&am
2019-01-13 18:46:21
309
原创 属性动画,平移,旋转,渐变,一个搞定所有动画
package bwie.com.day8_test;import android.animation.AnimatorSet;import android.animation.ObjectAnimator;import android.animation.ValueAnimator;import android.content.Intent;import android.os.Han...
2019-01-11 10:38:11
420
原创 新的mvp
package bwie.com.day8_test.model;public interface LeftInter{ public void getLeftData(String url,CallBacks callBacks); public void getRightData(String url,CallBacks callBacks); interface ...
2019-01-06 20:58:41
95
原创 recycleView的布局类型
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="m
2019-01-06 20:56:57
1217
原创 使用BottomTabBar+Fragment实现底部导航页
xml布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_wid...
2019-01-06 20:53:14
1094
原创 自定义标题栏
values文件夹下建attr.xml<?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="TobBar"> <attr name="leftButton" format="reference"/&
2019-01-06 20:51:30
78
原创 okhtpp的单例模式和拦截器
package bwie.com.day8_test.http;import android.os.Environment;import android.os.Handler;import android.util.Log;import com.google.gson.Gson;import java.io.File;import java.io.IOException;imp...
2019-01-06 20:41:06
132
原创 存放地址
package bwie.com.app1.api;public class Api { /* * 开发环境 * */ //public static final String BASE_URL="http://172.17.8.100"; /*http://172.17.8.100/small/commodity/v1/commodityL...
2019-01-01 19:41:18
197
原创 mvp展示listview
布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:orientation="vertical&q
2019-01-01 19:40:36
119
原创 mvp的注册
注册的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-auto" xmlns:tool...
2019-01-01 19:33:55
63
原创 mvp的登录注册
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-auto" xmlns:tools="
2019-01-01 19:25:50
112
原创 okhttp的get,post请求
导入依赖导入依赖:plementation 'com.squareup.okhttp3:okhttp:3.7.0' implementation 'com.squareup.okio:okio:1.12.0'package bwie.com.app1.network;import android.text.TextUtils;import android.util.Log;impo...
2019-01-01 19:04:12
253
原创 pulltorefresh上拉刷新下拉加载
mainactivity主代码package bwie.com.yuekao_1.Fragment;import android.os.AsyncTask;import android.os.Bundle;import android.support.annotation.NonNull;import android.support.annotation.Nullable;impor...
2018-12-20 18:50:36
197
原创 handler+httpConnection
package zyd.com.day2_1;import android.annotation.SuppressLint;import android.content.Context;import android.net.ConnectivityManager;import android.net.NetworkInfo;import android.os.Build;import...
2018-12-20 13:51:06
85
原创 封装判断网络是否有网
package bwie.com.zhaoyingdi1217.utils;import android.content.Context;import android.net.ConnectivityManager;import android.net.NetworkInfo;public class NetWorkUtils{ public static boolean ...
2018-12-20 10:36:40
97
原创 封装网络请求数据
package bw.com.ak.network;import android.content.Context;import android.util.Log;import java.io.ByteArrayOutputStream;import java.io.InputStream;import java.net.HttpURLConnection;import java.n...
2018-12-20 10:35:03
121
原创 tablayout和viewpager,侧滑相结合
xml布局<?xml version="1.0" encoding="utf-8"?><android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/too...
2018-12-20 09:10:57
117
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人