自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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 2390

原创 Android 后台下载更新apk并安装适配7.0以上

哎,这几天整这个下载更新整的头大,没办法,产品经理不要提示框,需要后台下载,这回博客和自己想象的不一样,亲手写了一个,记录到博客上:1.清单文件配置: <provider android:name="android.support.v4.content.FileProvider" android:authorities="cn.com.be...

2019-11-26 16:35:05 1888 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 284

原创 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 177

原创 Android环境配置

1.jdk安装:https://blog.csdn.net/bzlj2912009596/article/details/815076422.studio安装:http://www.android-studio.org/ studio安装包下载3.

2019-06-10 15:31:03 131

原创 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 991 1

原创 Android 微信原生登录

1.获取code值:①打开网址,找到android指南,导入依赖/*微信登录*/ implementation 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'②加入权限 &amp;lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&amp;gt; &amp;l...

2019-01-28 07:24:49 613 1

原创 Android 伸缩搜索框

1.首先写入布局&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/apk/res-auto" xmlns...

2019-01-25 15:44:49 1255 1

转载 Android-- FragmentStatePagerAdapter分页

ViewPagerViewPager&nbsp;如其名所述,是负责翻页的一个 View。准确说是一个&nbsp;ViewGroup,包含多个 View 页,在手指横向滑动屏幕时,其负责对 View 进行切换。为了生成这些 View 页,需要提供一个&nbsp;PagerAdapter&nbsp;来进行和数据绑定以及生成最终的 Vi...

2019-01-17 11:23:06 140

原创 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 682

原创 输入密码点击显示和隐藏

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 474

原创 OkHttp日志拦截器打印

public class LogInterceptor implements Interceptor { public static String TAG = &amp;amp;quot;LogInterceptor&amp;amp;quot;; @Override public Response intercept(Interceptor.Chain chain) throws IOException { ...

2018-12-21 08:07:02 411

原创 Retrofit头像上传

1.主页面布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;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 463

原创 登录注册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 295

原创 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 220

原创 第三方地图加定位小圆点

1.首先导入对应的jar包,jar包的具体位置在上一篇博客2.在app的build.gradle的android下边,写入: sourceSets { main { jni.srcDirs=[] jniLibs.srcDirs = ['libs'] } }3.在清单文件中写入:&amp;lt;meta-d...

2018-12-20 10:22:06 633

原创 第三方地图定位

1.首先到百度地图的开放平台注册一个自己的账号http://lbsyun.baidu.com/index.php?title=首页2.到控制台,创建一个应用3.之后进行提交没有获取SHA1的软件,这个大神的博客里边有https://blog.csdn.net/lixiaoliang0723/article/details/850766314.下载jar包(1)开发文档—&amp;gt;A...

2018-12-19 14:59:42 1170

原创 购物车单条目

1.自定义加减器布局布局代码&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="60dp" android:layout_heigh...

2018-12-15 10:35:14 186 1

原创 Retrofit网络请求工具类

public interface RetrofitService { @GET("article/list/0/json") //Call&lt;RecyBean&gt; getItem(); Observable&lt;RecyBean&gt; getMessage();} private void initRecy() { Retrofit ret...

2018-12-10 08:25:24 114

原创 XRecyclerView多条目展示以及上拉刷新下拉加载

1.主页面布局Main&lt;com.jcodecraeer.xrecyclerview.XRecyclerView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/recyclerView"&gt;&lt;/com...

2018-12-01 11:02:18 435 2

原创 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 256

原创 Fresco动画

1.主页面布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;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 182

原创 普通的recycleView展示添加删除

1.主页面XML&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/apk/res-auto" xmlns:tool...

2018-11-23 08:19:59 124

原创 xrecyclerview的上拉刷新下拉加载

依赖:implementation ‘com.jcodecraeer:xrecyclerview:1.2.0’ mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() { @Override public void onRefresh(...

2018-11-23 08:08:36 192

原创 Android 流式布局

1.主页面XML&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:layout_width=&quot;mat

2018-11-23 08:04:23 103

原创 Android 页面滑动切换

1.布局&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/apk/res-auto" xmlns:too...

2018-11-22 21:00:09 5008 2

原创 Android购物车

1.主页面的布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height=&quot

2018-11-22 20:54:06 7366

原创 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 1159

原创 Android 列表分类

1.主页面布局&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; xmlns:tools=&quot;http://schema

2018-11-22 14:55:05 2697

原创 自定义View加载进度条首页面

1.主页面布局&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;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 95

原创 第三方登录分享微信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 459

原创 Android 搜索框

1.首先布局文件&lt;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 468

原创 Android 跑马灯

1.首先导入一个跑马灯的依赖/*跑马灯*/ implementation 'com.sunfusheng:marqueeview:1.3.3'2.在布局文件里边写布局&lt;com.sunfusheng.marqueeview.MarqueeView android:id="@+id/marquee" android:layout_w...

2018-11-17 08:40:37 221

原创 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 735

原创 Android 属性动画

1.首先在res下边创建一个Directory文件夹,命名为animator2.在animator里边创建objectAnimator3.objectanimator.xml&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;objectAnimator xmlns:android="http://schemas.android.com/apk...

2018-11-14 20:59:41 99

原创 Android recyclerview添加删除条目点击事件

1.首先导入recyclerview依赖 implementation 'com.android.support:recyclerview-v7:28.0.0'2.activity_main.xml&lt;LinearLayout android:layout_width="match_parent" android:layout_height="wrap...

2018-11-14 20:44:41 759 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 420 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 200

原创 Android 生成二维码

1.布局Xml &amp;lt;LinearLayout android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;wrap_content&quot; android:orientation=&quot;horizontal&quot; android:gravity=&

2018-11-07 19:44:45 134 1

原创 Android 扫描二维码

首先布局xml &amp;lt;Button android:id=&quot;@+id/btn&quot; android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;wrap_content&quot; android:text=&quot;打开二维码扫描界面&quot;/&amp;gt;

2018-11-07 19:10:24 208

空空如也

空空如也

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

TA关注的人

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