自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 播放本地视屏

<?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_pare

2018-08-10 20:37:55 277

原创 //接口

//福利https://gank.io/api/data/%E7%A6%8F%E5%88%A9/10/1//京东首页https://www.zhaoapi.cn/home/getHome新闻接口:https://www.apiopen.top/journalismApi 随机推荐热门段子(包含文字、图片、GIF、视频):https://www.apiopen.top/satinA...

2018-08-09 09:32:05 441

原创 打开相机与相册

//打开相机//打开相机Intent in = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);//将图片放到SD cardin.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(path)));startActivityForResult(in, 100);Toast.makeT...

2018-08-06 16:25:13 224

原创 仿京东首页详情页面

//首页商品详情页面布局<?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" xmln...

2018-07-28 10:05:47 1615

原创 仿京东购物车适配器(二级列表)

//布局页面<?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...

2018-07-28 09:42:25 148

原创 RetroFit+RXjava实现轮播图

 //需要的依赖//banner轮播图implementation 'com.youth.banner:banner:1.4.10'//banner实现轮播图//接口类public static final String JD_HOME_LUNBO = "ad/getAd";//Api//首页的轮播图@GET(HttpConfig.JD_HOME_LUNBO)...

2018-07-21 17:56:24 272

原创 Retrofit+RXjava实现仿京东分类页面

//可能需要的依赖 //配置retrofit2.0 implementation 'com.squareup.retrofit2:retrofit:+' implementation 'com.squareup.retrofit2:converter-gson:+' //Rxjava2需要依赖 implementation 'io.reactivex.rxja...

2018-07-21 17:46:37 372

原创 Retrofit+Rxjava实现仿购物车功能

//可能需要的依赖 //配置retrofit2.0 implementation 'com.squareup.retrofit2:retrofit:+' implementation 'com.squareup.retrofit2:converter-gson:+' //Rxjava2需要依赖 implementation 'io.reactivex.rxj...

2018-07-21 17:20:20 246

原创 mvp(retrofit+rxjava实现)

1.首先创建一个MyApi(用于存放接口,调用接口)public interface MyApi { @GET(HttpConfig.DISH) Observable<DishBean> showDish(@Query("menu")String menu);}2.model层public class DishModel { private sta...

2018-07-15 19:01:05 192

原创 retrofitManager工具类+拦截器

/** * retrofit工具类 */ public class RetrofitManager {    private static final String BAS_URL =HttpConfig.BASE_URL;    private Retrofit retrofit;    private static class SingleHolder {     ...

2018-07-14 10:01:58 333

原创 retroFit的注解方法

1、什么是Retrofit框架? 它是Square公司开发的现在非常流行的网络框架 2.为什么使用Retrofit框架 性能好,处理快,使用简单,Retrofit 是安卓上流行的HTTP Client库之一 默认使用OKHttp处理网络请求,我觉得可以看成是OKHttp的增强。 默认使用Gson解析  二、配置Retrofit2.0   //配置retrofit2.0compile 'com....

2018-07-13 08:56:12 1937

原创 PeronBean

@Entity(nameInDb = "person") @Id(autoincrement = true)        private Long id;        @Property(nameInDb = "name")        private String name1;        private String time;

2018-07-08 21:52:42 125

原创 XrecylerView上拉加载下拉刷新(包括数据库缓存)(图片使用Fresco加载)

//依赖 //okhttpClient依赖 implementation 'com.squareup.okhttp3:okhttp:3.9.0'//拦截器的依赖 implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'//gson依赖包 implementation 'com.google.cod...

2018-07-08 21:21:17 360

原创 注解

1.新建一个model2.在里面创建类OnClick MyDelare  BindView  ButterKnife3. 导入插件依赖//插件依赖implementation 'com.jakewharton:butterknife:8.8.1'annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'//新建OnClick...

2018-07-06 09:52:11 134

原创 输入框流式布局(yyz勿看)

//布局<?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="h

2018-07-01 18:43:50 320

原创 OKHttpUtils的封装(get post)

杨运泽勿看public class OkHttpUtils { private final Handler handler; private final OkHttpClient okHttpClient; private static OkHttpUtils okHttpUtils; private OkHttpUtils() { //拦...

2018-06-30 10:52:01 1514 1

原创 仿京东购物车页面

、、依赖//okimplementation 'com.squareup.okhttp3:okhttp:3.9.0'//gsonimplementation 'com.google.code.gson:gson:2.8.4'//拦截器的依赖implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'//reclervie...

2018-06-30 10:36:07 791

原创 fragment(base)抽基类

//需要的依赖//okimplementation 'com.squareup.okhttp3:okhttp:3.9.0'//gsonimplementation 'com.google.code.gson:gson:2.8.4'//拦截器的依赖implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'//recler...

2018-06-30 10:24:18 227

原创 仿京东分类页面

、、需要倒的依赖//okimplementation 'com.squareup.okhttp3:okhttp:3.9.0'//gsonimplementation 'com.google.code.gson:gson:2.8.4'//拦截器的依赖implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'//recle...

2018-06-30 10:17:36 849

原创 XrecylerView多条目加载+上啊加载+下拉刷新

//依赖//xrecylerviewimplementation 'com.jcodecraeer:xrecyclerview:1.3.2'implementation 'com.android.support:design:27.1.1'//okimplementation 'com.squareup.okhttp3:okhttp:3.9.0'//拦截器implementation ...

2018-06-27 20:43:35 257

原创 二维码扫描+输入框输入内容,点击按钮生成二维码

实现步骤:1. 倒libzxing包2. 在Settings.gradle中添加   include ':app','libzxing'3.添加依赖//布局文件<?xml version="1.0" encoding="utf-8"?><ScrollView xmlns:android="http://schemas.android.com/apk/res/android" ...

2018-06-16 08:43:11 3364

原创 点击按钮生成二维码

实现步骤:1.   倒 libzxing2.   include ':app','libzxing'3. 添加到类库4.添加依赖//布局文件<?xml version="1.0" encoding="utf-8"?><ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android...

2018-06-16 08:38:01 2401

原创 Mvp实现登录功能

实现步骤:1.   在MVp包下的  Model包下  创建 LoginModel 类     Model主要用于联网请求数据2.  在MVp包下的 View包下 创建MyLoginView 类3.   在MVP包下的Presenter包下 创建 LoginPresenter 类4.   在在MVp包下的 View包下创建activity包,然后在包下创建 LoginActivity(里面包含友盟...

2018-06-15 20:58:12 534

原创 OkHttpUtils的封装(实现登录与注册)

public class OkhttpUtils { private OkHttpClient okHttpClient; private static OkhttpUtils okhttpUtils; private final Handler handler; private OkhttpUtils() { //创建一个主线程的handl...

2018-06-15 20:42:46 946

原创 友盟第三方登录

一共需要5步1.倒架包(共6个架包)2.添加网络请求权限3.添加微信,QQ,微博的依赖4.MyApp5.建包,包名为(wxapi) 6.在建好的包下建一个类,类名为:WXEntryActivity1.  //需要添加的权限<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /><uses...

2018-06-15 20:30:31 213

原创 流布局

public class FlowLayout extends ViewGroup {    public FlowLayout(Context context) {        super(context);    }    public FlowLayout(Context context, AttributeSet attrs) {        this(context, attrs, ...

2018-06-11 14:44:07 101

原创 流失布局

public class FlowLayout extends ViewGroup { public FlowLayout(Context context) { super(context); } public FlowLayout(Context context, AttributeSet attrs) { this(context...

2018-06-11 07:33:42 88

原创 自定义View+梯形布局+自定义标题栏(点击+号按钮实现添加,点击-号实现减)

//自定义标题栏public class MyTitleView extends LinearLayout implements View.OnClickListener { public MyTitleView(Context context) { super(context); } public MyTitleView(Context con...

2018-06-10 19:04:09 277

原创 自定义View(标题)

public class MyTitleView extends LinearLayout implements View.OnClickListener { public MyTitleView(Context context) { super(context); } public MyTitleView(Context context, @Nu...

2018-06-10 18:29:19 223

原创 无限轮播(图片)

public class MainActivity extends AppCompatActivity {    private String img1 = "http://pic34.photophoto.cn/20150318/0017030056359215_b.jpg";    private String img2 = "http://pic28.photophoto.cn/201307...

2018-06-04 20:18:43 181

原创 小圆点数量不会递增的方法

//懒汉式加载 @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); if(isVisibleToUser){ getLunBo();//line是线性布局...

2018-05-31 07:39:14 97

原创 MyApp

public class MyApp extends Application {    private Context context;    @Override    public void onCreate() {        super.onCreate();        context = this;        //初始化imageloader        initImageLo...

2018-05-30 09:13:08 2614

原创 轮播+商品展示的布局

<?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_paren

2018-05-30 08:30:36 508

原创 轮播+商品展示

public class GoodsShowActivity extends AppCompatActivity { private ViewPager viewpager; private LinearLayout line; private List<ImageView> img=new ArrayList<>(); priv...

2018-05-29 16:29:09 1349

原创 多条目加载的适配器

//多条目加载的适配器public class MyBaseAdapter01 extends BaseAdapter {    private Context context;    private List<OneBean.DataBean> list;    public MyBaseAdapter01(Context context, List<OneBean.DataB...

2018-05-29 10:06:04 115

原创 conUtils工具类

public String in(InputStream inputStream) throws IOException {        InputStreamReader isr = new InputStreamReader(inputStream);        BufferedReader br = new BufferedReader(isr);        String s_te...

2018-05-28 14:47:24 163

原创 MyListView

package bwei.com.day_0524_yuekaol_lianxi;import android.content.Context;import android.util.AttributeSet;import android.widget.ListView;public class MyListView extends ListView{    public MyListView(C...

2018-05-27 19:39:41 118

原创 无限轮播+商品展示+下拉刷新

//页面布局<?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="ht

2018-05-27 19:38:57 163

原创 福利的页面

//页面布局<?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_pa

2018-05-27 19:31:26 5468

原创 第一个fragment的网络请求+下拉刷新

//布局<?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_pare

2018-05-27 19:21:49 1088 1

空空如也

空空如也

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

TA关注的人

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