- 博客(58)
- 收藏
- 关注
原创 Android 手指滑动调节音量和亮度
1.加入依赖//引入工具依赖库 'com.blankj:utilcode:1.12.5' implementation 'com.blankj:utilcode:1.23.7'2.核心代码:package com.casic.leftscreenbrightnessrightvolume;import android.content.Context;import androi...
2019-11-29 10:14:07
2629
原创 Android 后台下载更新apk并安装适配7.0以上
哎,这几天整这个下载更新整的头大,没办法,产品经理不要提示框,需要后台下载,这回博客和自己想象的不一样,亲手写了一个,记录到博客上:1.清单文件配置: <provider android:name="android.support.v4.content.FileProvider" android:authorities="cn.com.be...
2019-11-26 16:35:05
2131
6
原创 页面切换显示横线
1.布局<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.Tab...
2019-08-10 15:34:29
346
原创 greendao
1.添加依赖在Model 下 bulid.gradle文件下的dependencies下添加所需依赖compile 'org.greenrobot:greendao:3.2.2' // add librarycompile 'org.greenrobot:greendao-generator:3.2.2'这句话是在上边写的 小渣渣啊→_→apply plugin: 'org.gree...
2019-07-18 13:44:11
224
原创 Android环境配置
1.jdk安装:https://blog.youkuaiyun.com/bzlj2912009596/article/details/815076422.studio安装:http://www.android-studio.org/ studio安装包下载3.
2019-06-10 15:31:03
188
原创 Android 仿QQ登录动态背景
效果图片:1, 自定义视频类 继承VideoViewpackage com.bw.movie.qqbg;import android.content.Context;import android.media.MediaPlayer;import android.util.AttributeSet;import android.view.KeyEvent;import androi...
2019-03-01 20:07:56
1050
1
原创 Android 微信原生登录
1.获取code值:①打开网址,找到android指南,导入依赖/*微信登录*/ implementation 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'②加入权限 &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &l...
2019-01-28 07:24:49
725
1
原创 Android 伸缩搜索框
1.首先写入布局<?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...
2019-01-25 15:44:49
1371
1
转载 Android-- FragmentStatePagerAdapter分页
ViewPagerViewPager 如其名所述,是负责翻页的一个 View。准确说是一个 ViewGroup,包含多个 View 页,在手指横向滑动屏幕时,其负责对 View 进行切换。为了生成这些 View 页,需要提供一个 PagerAdapter 来进行和数据绑定以及生成最终的 Vi...
2019-01-17 11:23:06
174
原创 android 时间格式 各种转换
import java.text.ParsePosition;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date;import java.util.GregorianCalendar;import java.util.Locale;import java.util.Rando...
2019-01-16 21:49:30
731
原创 输入密码点击显示和隐藏
1.//为eye图标注册事件监听 login_eye_check.setOnTouchListener(this);2. @Override public boolean onTouch(View v, MotionEvent event) { if (v.getId() == R.id.login_eye_check){ switch (eve...
2019-01-03 19:01:42
544
原创 OkHttp日志拦截器打印
public class LogInterceptor implements Interceptor { public static String TAG = &amp;quot;LogInterceptor&amp;quot;; @Override public Response intercept(Interceptor.Chain chain) throws IOException { ...
2018-12-21 08:07:02
486
原创 Retrofit头像上传
1.主页面布局<?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" xmln...
2018-12-20 19:26:42
510
原创 登录注册OkHttp+Mvp
1.登录的首页面package com.bawie.shopmkk;import android.content.Intent;import android.content.SharedPreferences;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import android....
2018-12-20 16:49:59
347
原创 Retrofit+Axjava+EventBus+Fresco购物车
1.首先 导入依赖 权限 (1) /*retrofit网络请求*/ implementation 'com.squareup.retrofit2:retrofit:2.1.0' implementation 'com.squareup.retrofit2:converter-gson:2.1.0' /*eventbus传值*/ implementation '...
2018-12-20 15:22:52
278
原创 第三方地图加定位小圆点
1.首先导入对应的jar包,jar包的具体位置在上一篇博客2.在app的build.gradle的android下边,写入: sourceSets { main { jni.srcDirs=[] jniLibs.srcDirs = ['libs'] } }3.在清单文件中写入:&lt;meta-d...
2018-12-20 10:22:06
692
原创 第三方地图定位
1.首先到百度地图的开放平台注册一个自己的账号http://lbsyun.baidu.com/index.php?title=首页2.到控制台,创建一个应用3.之后进行提交没有获取SHA1的软件,这个大神的博客里边有https://blog.youkuaiyun.com/lixiaoliang0723/article/details/850766314.下载jar包(1)开发文档—&gt;A...
2018-12-19 14:59:42
1263
原创 购物车单条目
1.自定义加减器布局布局代码<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="60dp" android:layout_heigh...
2018-12-15 10:35:14
214
原创 Retrofit网络请求工具类
public interface RetrofitService { @GET("article/list/0/json") //Call<RecyBean> getItem(); Observable<RecyBean> getMessage();} private void initRecy() { Retrofit ret...
2018-12-10 08:25:24
157
原创 XRecyclerView多条目展示以及上拉刷新下拉加载
1.主页面布局Main<com.jcodecraeer.xrecyclerview.XRecyclerView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/recyclerView"></com...
2018-12-01 11:02:18
470
原创 Android 列表展示简单Fresco圆形图片
1.在build.gradle首先导入依赖implementation 'com.facebook.fresco:fresco:1.11.0'2.全局初始化@Override public void onCreate() { super.onCreate(); Fresco.initialize(this); }3.在清单文件中网络权限...
2018-11-28 13:40:28
294
原创 Fresco动画
1.主页面布局<?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="ma
2018-11-27 21:26:05
227
原创 普通的recycleView展示添加删除
1.主页面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...
2018-11-23 08:19:59
147
原创 xrecyclerview的上拉刷新下拉加载
依赖:implementation ‘com.jcodecraeer:xrecyclerview:1.2.0’ mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() { @Override public void onRefresh(...
2018-11-23 08:08:36
237
原创 Android 流式布局
1.主页面XML&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="mat
2018-11-23 08:04:23
127
原创 Android 页面滑动切换
1.布局<?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:too...
2018-11-22 21:00:09
5065
2
原创 Android购物车
1.主页面的布局<?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-11-22 20:54:06
8827
原创 Android 拦截器
LoggingInterceptor(拦截器页面)package com.sn.a1606bcat;import java.io.IOException;import okhttp3.Interceptor;import okhttp3.Request;import okhttp3.Response;/** * 日志拦截器类,请求来了,先在这里进行处理,可以得到发请求到得到请求...
2018-11-22 15:02:22
1220
原创 Android 列表分类
1.主页面布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schema
2018-11-22 14:55:05
2841
原创 自定义View加载进度条首页面
1.主页面布局<?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:to...
2018-11-22 14:36:18
120
原创 第三方登录分享微信qq
1参考https://developer.umeng.com/docs/66632/detail/666392Mainpackage com.umeng.soexample;import android.Manifest;import android.content.Intent;import android.os.Build;import android.support.v4.ap...
2018-11-18 21:23:01
498
原创 Android 搜索框
1.首先布局文件<android.support.v7.widget.SearchView android:layout_width="0dp" android:layout_height="50dp" android:layout_weight="8" android:background="...
2018-11-17 08:47:05
512
原创 Android 跑马灯
1.首先导入一个跑马灯的依赖/*跑马灯*/ implementation 'com.sunfusheng:marqueeview:1.3.3'2.在布局文件里边写布局<com.sunfusheng.marqueeview.MarqueeView android:id="@+id/marquee" android:layout_w...
2018-11-17 08:40:37
299
原创 Android 第三方登录分享
1.首先加入依赖 implementation files('libs/SocialSDK_QQ_Simplify.jar') implementation files('libs/umeng_social_api.jar') implementation files('libs/umeng_social_net.jar') implementation files...
2018-11-15 20:54:54
781
原创 Android 属性动画
1.首先在res下边创建一个Directory文件夹,命名为animator2.在animator里边创建objectAnimator3.objectanimator.xml<?xml version="1.0" encoding="utf-8"?><objectAnimator xmlns:android="http://schemas.android.com/apk...
2018-11-14 20:59:41
118
原创 Android recyclerview添加删除条目点击事件
1.首先导入recyclerview依赖 implementation 'com.android.support:recyclerview-v7:28.0.0'2.activity_main.xml<LinearLayout android:layout_width="match_parent" android:layout_height="wrap...
2018-11-14 20:44:41
850
4
原创 Android OkHttp 网络获取轮播图
1.首先导入依赖 /*轮播图 依赖*/ implementation 'com.youth.banner:banner:1.4.9' //okhttp3 implementation 'com.github.bumptech.glide:glide:4.8.0' //图片glide implementation 'com.squareup.okht...
2018-11-13 10:16:44
472
1
原创 MVP登录
MainActivitypackage com.bwie.a20181111_a;import android.content.Intent;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import android.text.TextUtils;import android.vie...
2018-11-11 21:27:58
279
原创 Android 生成二维码
1.布局Xml &lt;LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity=&
2018-11-07 19:44:45
163
1
原创 Android 扫描二维码
首先布局xml &lt;Button android:id="@+id/btn" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="打开二维码扫描界面"/&gt;
2018-11-07 19:10:24
270
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人