自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Fresco加载本地GIF图

Uri uri = new Uri.Builder()        .scheme(UriUtil.LOCAL_RESOURCE_SCHEME)        .path(String.valueOf(R.mipmap.ticket_order))        .build();DraweeController controller = Fresco.newDraweeCo

2018-02-05 16:56:07 360

原创 GreenDao的使用

GreenDao请点击下面这个网址:http://blog.csdn.net/w98326angle/article/details/79084865

2018-01-22 16:40:36 174

原创 Fresco磁盘缓存

public class CiPanHuanCun { //分配的可用内存 private static final int MAX_HEAP_SIZE = (int) Runtime.getRuntime().maxMemory(); //使用的缓存数量 private static final int MAX_MEMORY_CACHE_SIZE = MAX_H

2018-01-19 20:13:36 437

原创 EventBus的使用

介绍的是粘性事件:首先先创建一个类:public class MessageEvent { private int message; public MessageEvent(int message) { this.message = message; } public int getMessage() { return messa

2018-01-18 19:38:13 303

原创 GreenDao+多线程和断点续传实现下载

先看下效果图:点击下载进度条开始动,实现下载点击下载后下载按钮变成不可按的状态暂停按钮变成可按状态点击暂停后下载按钮再次变成可按状态,点击下载继续续传下载完成后,下载完成按钮变成可点击,下载完成后点击下载完成播放下载的视频下面开始粘代码:首先我们生成GreenDao倒入依赖:compile

2018-01-17 15:17:06 427

原创 使用retrofit拼接的接口

public interface ApiService { @FormUrlEncoded @POST("user/reg") Observable reg_url(@FieldMap Map map); @FormUrlEncoded @POST("user/login") Observable login(@FieldMap Map map);

2018-01-17 10:59:09 452

原创 商城购物车需要的依赖

//buterknifecompile 'com.jakewharton:butterknife:8.8.1'annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'//frescocompile 'com.facebook.fresco:fresco:0.14.1'//eventbuscompile 'org.g

2018-01-17 10:51:42 196

原创 电商项目--------购物车逻辑的实现

使用的是rxjava观察者模式主布局:RelativeLayout 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"

2018-01-16 21:07:13 1836

原创 电商登录注册的实现

首先使用的是MVP框架实现,注册的布局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/too

2018-01-16 20:10:19 2096

原创 封装Retrofit的工具类

public class RetrofitUtil { public static OkHttpClient okHttpClient; public static ApiService apiService; static { getOkHttpClient(); } public static OkHttpClient getOk

2018-01-16 19:54:37 186

原创 recyclerview多条目

mainActivity代码:public class MainActivity extends AppCompatActivity implements IView{ RecyclerView recyclerview; String path = "http://result.eolinker.com/umIPmfS6c83237d9c70c7c9510c9b0f9

2018-01-02 07:50:50 163

原创 常用的Git命令

Git 是一个很强大的分布式版本控制系统。它不但适用于管理大型开源软件的源代码,管理私人的文档和源代码也有很多优势。Git常用操作命令:1) 远程仓库相关命令检出仓库:$ git clone git://github.com/jquery/jquery.git查看远程仓库:$ git remote -v添加远程仓库:$ git remote add

2017-12-27 16:55:25 222

原创 京东购物车

布局:RelativeLayout 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:

2017-12-21 09:39:57 204

原创 组合属性动画的使用

布局:RelativeLayout 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:la

2017-12-21 09:31:27 175

原创 封装RunOnUIThread方法

package com.example.desktop.gouwuche_demo.utils;/** * Created by Dash */import android.content.SharedPreferences;import android.graphics.drawable.Drawable;import android.view.View;/** * Cre

2017-12-21 09:29:21 666

原创 RecyclerView条目的点击事件,接口回调

第一个,MyOnItemClickListener.java,响应 RecyclerView item的点击事件:import android.view.View;/** * item点击接口 */public interface MyOnItemClickListener { void OnItemClickListener(View view, int position);

2017-12-18 14:41:25 321

原创 OkHttp封装,以及拦截器,拦截公共参数

package com.example.week3_lianxi.utils;import android.app.Activity;import android.content.Intent;import android.net.Uri;import android.os.Environment;import android.util.Log;import android.widg

2017-12-17 21:10:24 646

原创 仿京东搜索效果

搜索页面:            布局:LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://

2017-12-17 21:02:49 1093

原创 texteview的下划线

textView.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下划线textView.getPaint().setAntiAlias(true);//抗锯齿textview.getPaint().setFlags(Paint. STRIKE_THRU_TEXT_FLAG); //中划线

2017-12-15 10:27:45 149

原创 正则表达式

regex = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\\d{8}$";        //创建presenter        registPresenter = new RegistPresenter(this);    }    public void regist(View view) {

2017-12-11 07:53:11 133

原创 RecyclerView的使用

一、添加依赖:二、布局:android.support.v7.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" >android.support.v7.w

2017-12-10 20:45:14 119

原创 SharedPreferences记住信息

一、点击多选框记住密码public class Main3Activity extends Activity { private EditText name; private EditText pwd; private CheckBox ck; private Button login; private SharedPreferences sp; @

2017-12-10 20:02:13 142

原创 封装OKHttp,工具类

public class OkHttp3Util { private static OkHttpClient okHttpClient = null; private OkHttp3Util() { } public static OkHttpClient getInstance() { if (okHttpClient == null) {

2017-12-10 19:10:10 218

原创 流式布局

一、布局:com.bwie.wudan.MFlowLayout android:id="@+id/flow_layout" android:layout_height="wrap_content" android:layout_width="wrap_content">com.bwie.wudan.MFlowLayout>二、MainActivity代码:

2017-12-04 11:34:36 141

原创 自定义控件实现banner轮播

一、添加依赖compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'compile 'com.google.code.gson:gson:2.8.2'compile 'com.squareup.okhttp3:okhttp:3.6.0'compile 'com.squareup.okio:okio

2017-12-03 21:07:50 590

原创 banner无限自动轮播图片

一、添加依赖xbanner依赖:compile 'com.xhb:xbanner:1.2.9'compile 'com.github.bumptech.glide:glide:3.7.0'compile 'jp.wasabeef:glide-transformations:1.0.6'二、添加布局com.stx.xhb.xbanner.XBanner xml

2017-12-03 20:52:01 257

原创 自定义view画太极图

效果图:布局:com.example.day03_custom_view.view.Taiji_view android:layout_width="match_parent" android:layout_height="match_parent" />java代码:public class Taiji_view extends View{

2017-11-30 20:39:25 210

原创 angular购物车结算

*{    margin: 0;    padding: 0;       }   .box{    width: 310px;    height: 400px;    margin: auto;    background: silver;   }   img{    width: 80px;    height: 80px;   }

2017-11-23 11:38:19 178

原创 angularJS购物车,表单判断

.tab1 tbody tr:nth-child(odd){    background: silver;   }   .tab1 thead tr{    background: grey;   }   .tab1{    width: 700px;   }   .tab2{    margin-top: 30px;    margin-left: 1

2017-11-23 11:35:34 188

原创 angularJS添加表格,通过过滤器查找

table{    margin-top: 20px;   }   .table1{    width: 600px;   }          var app = angular.module("myApp", []);   app.controller("myCtrl", function($scope) {    //定义数组    

2017-11-19 20:08:51 390

转载 ionic css的样式操作 详细介绍

1.    ionic css基本布局 2.    ionic css色彩、图标和边距3.    ionic css界面组件列表4.    ionic css界面组件按钮5.    ionic css界面组件 表单输入6.    ionic css界面组件选项卡7.    ionic css定制布局 Grid布局第十三讲免费视频教程下载地址:http://bbs

2017-11-16 09:31:57 1231 2

原创 全选、反选、批量删除

form{    margin-bottom: 30px;   }   table{    width: 800px;    margin-top: 10px;   }   div{    margin-left: 570px;   }         //二级联动    $(function() {         var cities

2017-11-13 13:40:31 513

原创 jQuery简单表单判断,获取框中的数据动态到添加表格

table{    width: 400px;   }   .biao{    width: 500px;    margin-top: 60px;   }         $(function(){   var cities = [            ["杭州市","绍兴市","温州市","义乌市","嘉兴市"],            [

2017-11-13 13:10:50 1834

原创 省市二级联动

$(function() {        var cities = [            ["杭州市","绍兴市","温州市","义乌市","嘉兴市"],            ["南京市","苏州市","扬州市","无锡市"],            ["武汉市","襄阳市","荆州市","宜昌市","恩施市"],            ["石家庄市","唐山市","保

2017-11-12 20:10:06 179

原创 点击listview条目向fragment中传值

=========================布局   主布局===================================LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:back

2017-10-25 20:23:19 1067

原创 每三秒图片自动切换,不是轮播

布局:ImageView android:id="@+id/faxian_img" android:layout_width="match_parent" android:layout_height="200dp" />=====================代码===========================public c

2017-10-25 19:30:57 4103

原创 点击头像,调用相机,相册改变头像

imageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { AlertDialog.Builder builder=new AlertDialog.Builder(Main3Activity.this); bu

2017-10-25 10:34:30 829

原创 导航页面,三张图片后点击进入主页面 第一次显示导航再次访问不显示导航页面sharedPreference

布局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:lay

2017-10-25 10:27:15 1331

原创 实现页面三秒跳转

public class MainActivity extends AppCompatActivity { int i=3;Handler handler=new Handler(){ @Override public void handleMessage(Message msg) { if (i0){ i--;

2017-10-25 10:12:51 30414

原创 DrawerLayout侧滑的实现

效果图1效果图2代码 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); drawerLayout = (

2017-10-22 19:23:51 125

空空如也

空空如也

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

TA关注的人

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