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

原创 日期选择器
implementation 'com.contrarywind:Android-PickerView:4.1.6'package bwei.com.shangchuang.mvp.ui.activity;import android.Manifest;import android.content.Intent;import android.os.Build;import and...
2018-09-24 19:08:06
223

原创 依赖库
连接逍遥 cd c:\RuanJian\XiaoYao\Microvirt\MEmu adb.exe connect 127.0.0.1:21503 https://www.zhaoapi.cn/quarter/getAd android.enableAapt2=false PullToRefresh com.handmark.pulltorefresh.libr...
2018-08-24 20:44:11
589

原创 上传头像 并裁剪
Mainpublic class MainActivity extends BaseActivity<MainPresenter> implements MainContract.View { @BindView(R.id.btn) Button btn; @BindView(R.id.tv) TextView tv; @Bin...
2018-08-18 11:40:41
446
转载 状态栏工具类
package com.llw.mybluetooth.util;import android.annotation.TargetApi;import android.app.Activity;import android.graphics.Color;import android.os.Build;import android.view.View;import android.view.Window;import android.view.WindowManager;import ja.
2022-04-28 15:02:50
211
原创 时间转换工具类
package com.wd.tech.app.utils;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;/** * @ProjectName: Science * @Package: com.wd.tech.app.utils * @ClassNa...
2018-11-03 10:50:01
181
原创 ChangeFileFormat
package bwei.com.shangchuang.mvp.model.api.service;import android.content.ContentResolver;import android.content.Context;import android.database.Cursor;import android.graphics.Bitmap;import and...
2018-09-24 20:08:41
254
原创 捕获异常
package com.example.day01;import android.app.Application;/** * Created by lenovo on 2018/9/15. */public class app extends Application { @Override public void onCreate() { supe...
2018-09-17 08:27:40
193
原创 滑动删除BRVAh所实现
OnItemDragListener onItemDragListener = new OnItemDragListener() { @Override public void onItemDragStart(RecyclerView.ViewHolder viewHolder, int pos){} @Override pub...
2018-09-17 08:26:26
1362
原创 MVP Arms
MainInfoPresenter public void getInfoData(){ Observable<ResponseBody> observable = mModel.requestData(); observable.subscribeOn(Schedulers.io()) .observeOn(An...
2018-09-10 08:23:49
711
原创 FrameLayout + RadioGroup
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layo...
2018-09-09 20:48:50
216
原创 EnvenBus
implementation 'org.greenrobot:eventbus:3.1.1'package myshou.bwei.com.envenbus;import android.content.Intent;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import an...
2018-09-07 16:12:54
813
原创 Fresco
Apppackage com.bwei.fresco;import android.app.Application;import android.graphics.Bitmap;import android.util.LruCache;import com.facebook.common.internal.Supplier;import com.facebook.drawee.b...
2018-09-07 14:14:02
174
原创 封装Retrofit
package com.bwei.retiodit_rxjava_mvp.data.utils;import com.bwei.retiodit_rxjava_mvp.data.Api;import java.sql.Time;import java.util.concurrent.TimeUnit;import okhttp3.OkHttpClient;import retro...
2018-09-06 20:45:54
173
原创 Dagger2
依赖 implementation 'com.google.dagger:dagger:2.14.1' annotationProcessor 'com.google.dagger:dagger-compiler:2.14.1'Componentpackage com.bwei.retiodit_rxjava_mvp.di.IComponent;import com....
2018-09-06 20:43:36
157
原创 Retrofit 注解的使用
package com.baway.alex.retrofitdemo.di;public class Constant { //存放完整地址 public static final String URL = "http://112.124.22.238:8081/course_api/cniaoplay/featured?p={%22page%22:0}"; // ...
2018-09-06 20:12:20
154
原创 Retrofit 的8中注解
依赖implementation 'io.reactivex.rxjava2:rxandroid:2.0.2' implementation 'io.reactivex.rxjava2:rxjava:2.0.2' implementation 'com.squareup.retrofit2:retrofit:2.0.2' implementation 'com.squ...
2018-09-06 20:11:21
150
原创 GreenDao
implementation 'org.greenrobot:greendao:3.2.2' // add libraryapply plugin: 'com.android.application'apply plugin: 'org.greenrobot.greendao' // apply plugin mavenCentral() // add repository cl...
2018-09-03 08:13:06
150
原创 GreenDao+Fresco
依赖implementation 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' implementation 'org.greenrobot:greendao:3.2.2' // add library im...
2018-09-02 22:16:13
177
原创 doPost
例 */ V层 private void loadData() { HashMap<String, String> params = new HashMap<>(); params.put("uid", "71"); params.put("page",page+""); CartPe
2018-08-24 19:39:52
320
原创 Dialog.....................
package com.example.day08_dialog;import android.app.Activity;import android.app.AlertDialog;import android.app.AlertDialog.Builder;import android.content.DialogInterface;import android.content.D...
2018-08-24 15:19:22
139
原创 购物车---准备---其他请看其他博客
//依赖//Gsonimplementation 'com.google.code.gson:gson:2.8.5' //OkHttpimplementation 'com.squareup.okhttp3:okhttp:3.11.0'implementation 'com.squareup.picasso:picasso:2.71828'满分
2018-08-24 11:04:43
125
原创 购物车--子条目--父条目
子条目<?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="120dp
2018-08-24 10:54:15
242
原创 购物车---适配器
package com.bwei.gouwuchemoni;import android.view.View;import android.view.ViewGroup;import android.widget.BaseExpandableListAdapter;import android.widget.CheckBox;import android.widget.ImageVi...
2018-08-24 10:51:09
195
原创 购物车--ExpandableListView实现
布局<?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="
2018-08-24 10:49:41
260
原创 购物车----自定义加减器
布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="80dp" android:layout_height="30dp"
2018-08-24 10:44:02
223
原创 动画
<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android"><objectAnimator android:duration="2000" android:propertyName="r
2018-08-20 08:27:33
111
原创 recyclerview+多条目
implementation 'com.android.support:recyclerview-v7:27.+' package com.bwei.recycle_duotiaomu;import android.content.Context;import android.support.annotation.NonNull;import android.support.v7...
2018-08-17 20:14:07
135
原创 recyclerview + 自定义借口 实现点击(麻烦)
implementation 'com.android.support:recyclerview-v7:27.+' //将数据源设置给适配器SubAdapter subAdapter = new SubAdapter(MainActivity.this, list);subAdapter.setOnItemClickLisentener(new SubAdapter.onItemC...
2018-08-17 20:06:32
131
原创 recyclerview+br
implementation 'com.android.support:recyclerview-v7:27.+' BRVAH allprojects { repositories { ... maven { url "https://jitpack.io" } } } dependencies ...
2018-08-17 20:02:10
106
原创 SmartRefreshLayout 上拉下拉
依赖implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-14' implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-alpha-14'smarter_fresh = (SmartRefreshLayout) inf...
2018-08-17 19:59:24
445
原创 二维码
依赖implementation 'com.journeyapps:zxing-android-embedded:3.6.0'//权限android:hardwareAccelerated="true" 布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http:...
2018-08-12 22:11:12
143
原创 MVP框架实现注册登录+数据展示
//依赖implementation 'com.squareup.okhttp3:okhttp:3.11.0'implementation 'com.google.code.gson:gson:2.2.4'implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'allprojects { repos...
2018-08-12 22:09:22
353
原创 流式布局
package zidingyiview.bwei.com.view;import android.content.Context;import android.util.AttributeSet;import android.view.View;import android.view.ViewGroup;import android.widget.GridView;/** *...
2018-08-05 19:22:36
112
原创 动画 图片渐变
现在res下建立anim文件 在anim中建立 动画文件 a渐变 s缩小 r旋转 t平移.//记得修改 注册文件中的由此进入的Activity<?xml version="1.0" encoding="utf-8"?><alpha xmlns:android="http://schemas.android.com/apk/res/android" andro...
2018-07-29 20:03:07
327
原创 Gson+pulltorefer+数据库+httpurlconnection+异步(更新)
javapackage com.example.jacklee.myyuekaomoni.fragement;import android.annotation.SuppressLint;import android.content.Context;import android.os.Bundle;import android.os.Handler;import android....
2018-07-28 19:19:04
142
原创 判断是否有网络
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> MianActivitypackage lqs.bwei.com.iswangluowifi;import android.content.Intent;import android.os.Build;import...
2018-07-27 16:03:29
162
原创 频道管理(tablayout)
主页面(还有两个页面}(布局)\//依赖implementation 'channelmanager:channelmanager:0.4.8'项目的build.gradle中添加repositories { google() jcenter() 只有这一行 maven { url 'https://dl.bintray.com/bruceanda/mav...
2018-07-27 09:20:42
292
原创 侧滑监听事件吐司 主页面跟着滑动
drawerLayout.addDrawerListener(new DrawerLayout.DrawerListener() { @Override public void onDrawerSlide(View drawerView, float slideOffset) { ` //侧滑 主页面跟着滑动 View content = drawerlay...
2018-07-22 21:46:27
152
原创 TabLayout
需要依赖implementation 'com.android.support:design:27.+' //布局 <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android...
2018-07-22 20:04:28
113
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人