自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 listivew单条刷新

1.接收刷新的消息(可使用eventBus),拿到item的id,position 2.adapter中/** * 单条item刷新 * * @param attention */ public void updateView(String artistId, int attention) { LogUtil.e("log:posit

2016-12-22 10:16:59 295

转载 可以滑动,定时轮播的banner

可以滑动,定时轮播的banner as: compile ‘com.youth.banner:banner:1.4.2’ 布局: <com.youth.banner.Banner android:id="@+id/banner_viewpager" android:layout_width="match_par

2016-12-21 11:15:42 571

原创 集合A 两两一组 重新组合成集合B

集合A 转化成 集合B 1.Map:拼接Stringpublic static void main(String[] args) { Map map=new HashMap(); Map map2=new HashMap(); String s=null; int j=0; map.put(1,"a"); map.put(2,"b");

2016-12-07 11:07:14 479

转载 app跳转app

包名和Activity对应的类名已知的情况 Intent intent = new Intent(); intent.setClassName(“com.UCMobile”, “com.UCMobile.main.UCMobile”); this.startActivity(intent); 或者这样Intent intent = new Intent(); Compone

2016-11-21 11:00:43 578 1

原创 图片缩放时IllegalArgumentException异常

;/** * 捕获异常--photoView图片缩放绘制图片时IllegalArgumentException andr

2016-11-18 14:07:17 463

转载 标签控件,下方带有滑动块

/** * 标签控件,下方带有滑动块 */public class TabsView extends HorizontalScrollView { private LinearLayout.LayoutParams defaultTabLayoutParams; private LinearLayout.LayoutParams expandedTabLayoutParams;

2016-11-18 14:04:24 201

转载 能够上下拖拽的scrollview

/** * A ScrollView which can scroll to (0,0) when pull down or up. * 能够上下拖拽的ScrollView , * 视差比例 0.5 */public class StretchScrollView extends ScrollView { private static final String TAG = "

2016-11-18 13:48:23 204

转载 自定义的形状ImageView

import android.content.Context;import android.content.res.TypedArray;import android.graphics.Bitmap;import android.graphics.BitmapShader;import android.graphics.Canvas;import android.graphics.Colo

2016-11-18 13:45:58 260

转载 TAB多标签,可滑动,文字下有横线跟随

/* * Copyright (C) 2013 Andreas Stuetz <andreas.stuetz@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licen

2016-11-18 13:40:26 1068

转载 viewpager懒加载

viewpager懒加载/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lic

2016-11-17 14:56:25 277

转载 图片模糊的实现

/** * 高斯算法 */public class FuzzyBitmap { /** * 水平方向模糊度 */ private static float hRadius = 10; /** * 竖直方向模糊度 */ private static float vRadius = 10; /** * 模糊迭代度

2016-11-17 14:53:34 229

转载 倒计时

发送短信60s倒计时CountDownTimer类:public abstract class CountDownTimer { /** * Millis since epoch when alarm should stop. */ private final long mMillisInFuture; /** * The interval in

2016-11-17 14:39:10 250

转载 圆形图片

圆形图片public class CircleImageView extends ImageView { private static final ScaleType SCALE_TYPE = ScaleType.CENTER_CROP; private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_888

2016-11-17 14:32:59 174

转载 Banner无限轮播

Banner 无限轮播public class BannerViewPager extends FrameLayout implements View.OnClickListener { private ItemClickListener itemClickListener; /** * 图片内容 */ private List<HomeData.Banne

2016-11-17 14:28:51 232

原创 EventBus简单使用

EventBus的简单使用环境:Android-studiocompile ‘de.greenrobot:eventbus:2.4.0’A:发送事件ExampleEvent event = new ExampleEvent (); event.setName("张三"); event.setAge("13"); EventBus.getDefault(

2016-11-17 10:50:53 179

原创 listview分页加载

listview分页加载1.实现 AbsListView.OnScrollListener接口 2.复写两个方法 @Override public void onScrollStateChanged(AbsListView view, int scrollState) { } @Override public void onScroll(AbsListView view

2016-11-17 10:38:04 277

原创 ViewPager+Fragment

ViewPager+Fragment (带滑块)public class ExampleActivity extends FragmentActivity implements ViewPager.OnPageChangeListener, View.OnClickListener { /** * viewpager */ private ViewPage

2016-11-17 10:28:21 166

原创 ScrollView嵌套listview

ScrollView嵌套ListView(listview条目全部展示)1.重写listview 2.appreciationLv.setFocusable(false);public class CustomListview extends ListView{public CustomListview(Context context) { super(context);}public

2016-11-17 09:58:53 176

原创 ScrollView置顶按钮

ScrollView置顶按钮public class PullableScrollView extends ScrollView implements PullableListener, View.OnClickListener { private ImageView goTopBtn;private int screenHeight;public PullableScrollView(

2016-11-16 14:45:00 215

转载 PullToRefreshLayout实现上下拉刷新

PullToRefreshLayout实现上下拉刷新

2016-11-16 14:05:48 1766

空空如也

空空如也

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

TA关注的人

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