路漫漫之大神之养成
码龄14年
关注
提问 私信
  • 博客:26,159
    26,159
    总访问量
  • 41
    原创
  • 1,146,327
    排名
  • 4
    粉丝
  • 0
    铁粉

个人简介:请多多指教!!!

IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:北京市
  • 加入CSDN时间: 2011-04-10
博客简介:

wan767912626的博客

查看详细资料
个人成就
  • 获得5次点赞
  • 内容获得1次评论
  • 获得17次收藏
创作历程
  • 17篇
    2017年
  • 24篇
    2016年
成就勋章
TA的专栏
  • 算法
    17篇
  • 数据结构
    8篇
  • 链表
    5篇
  • 数组
    1篇
  • 栈
    1篇
  • 排序
    7篇
  • 二叉树
    1篇
  • 图
    9篇
  • android
    17篇
创作活动更多

如何做好一份技术文档?

无论你是技术大神还是初涉此领域的新手,都欢迎分享你的宝贵经验、独到见解与创新方法,为技术传播之路点亮明灯!

180人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

更改Tab下划线的宽度

通过反射更改下划线的宽度public static void setIndicator(final TabLayout tabLayout){ tabLayout.post(new Runnable() { @Override public void run() { try { //拿到tabL
原创
发布博客 2017.12.09 ·
3653 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

ViewPager的简单使用

使用ViewPager需要适配器,分为两种:PagerAdapter和FragmentPagerAdapter1.PagerAdapter:必须实现的四个方法://返回要滑动的View的个数@Overridepublic int getCount() { return mList.size();}//判断当前view与key是否相同@Overridepubl
原创
发布博客 2017.12.09 ·
246 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

ScrollView与ListView 的滑动冲突

当scrollView中要嵌套ListView时,需要重写ListView的onMeasure()方法:@Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_V
原创
发布博客 2017.12.09 ·
285 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

ViewPager圆形指示器

导入依赖:compile 'me.relex:circleindicator:1.2.2@aar'使用:CircleIndicator circleIndicator;//绑定IDcircleIndicator = (CircleIndicator)findViewById(R.id.activity_strategy_indicator);//绑定ViewPager
原创
发布博客 2017.12.08 ·
375 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Banner 轮播图

导入依赖:compile 'com.youth.banner:banner:1.4.9'初始化:Banner banner = (Banner) view.findViewById(R.id.fragment_home_banner);//图片加载器banner.setImageLoader(new GlideImageLoader());//图片集合banner.
原创
发布博客 2017.12.08 ·
274 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

图片旋转

使用://degree 获取旋转的角度 //path 图片路径int degree = ImageUtils.readPictureDegree(path);Bitmap bitmap = BitmapFactory.decodeFile(path,bitmapOptions);//旋转图片操作bitmap = ImageUtils.rotaingImageView(degre
原创
发布博客 2017.12.08 ·
185 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

动画的使用

属性动画的运行机制是通过不断地对值进行操作来实现的。ValueAnimator:动画机制中的核心类,初始值和结束值之间的动画过渡是由这个类负责的。使用:ObjectAnimator:可以对任意对象的任意属性进行动画操作。使用:只要对象中有setXXX() 和 getXXX
原创
发布博客 2017.12.08 ·
208 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

定时任务

定时任务有三种:1.TimerTask2.AlarmManager3.CountDownTimer1.TimerTask:TimerTask task= new TimerTask() { @Override public void run() { count++; Log.i("M
原创
发布博客 2017.12.08 ·
174 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

图片压缩

1. 像素压缩BitmapFactory.Options bitmapOptions = new BitmapFactory.Options();//缩放图片bitmapOptions.inSampleSize = 8;Bitmap bitmap = BitmapFactory.decodeFile(path,bitmapOptions);2. 质量压缩ByteArrayOu
原创
发布博客 2017.12.08 ·
150 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

手机摇一摇功能

/** * 工具类,实现监测摇一摇 **/public class ShakeUtil implements SensorEventListener { private SensorManager mSensorManager = null; private OnShakeListener mOnShakeListener = null; //重力加速度
原创
发布博客 2017.12.08 ·
361 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

二维码的使用

导入依赖:compile 'cn.yipianfengye.android:zxing-library:2.1'添加权限:1.先在Application中进行初始化:ZXingLibrary.initDisplayOpinion(this);2.扫描二维码:Intent intent = new Intent(getA
原创
发布博客 2017.12.08 ·
194 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

状态栏的使用

沉浸模式:游戏和爱奇艺电影Android 4.4 及以上可以实现状态栏透明:Android 5.0及以上才可以使用隐藏底部导航栏:View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION隐藏顶部导航栏:View.SYSTEM_UI_FLAG_LAYOUT_STAB
原创
发布博客 2017.12.08 ·
268 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

软键盘弹出时顶起上方布局

在指定activity中,添加 android:windowSoftInputMode="adjustPan|stateHidden",上方布局将不会上移,而是软键盘会覆盖上方布局。
原创
发布博客 2017.12.08 ·
424 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

获取手机内的所有应用列表

获取手机内所有应用信息
原创
发布博客 2017.10.13 ·
2081 阅读 ·
1 点赞 ·
0 评论 ·
5 收藏

HttpClient

packagingOptions { exclude 'META-INF/NOTICE' // will not include NOTICE file exclude 'META-INF/LICENSE' // will not include LICENSE file // as noted by @Vishnuvathsan you may a
原创
发布博客 2017.04.06 ·
408 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

RelativeLayout 居中

在RelativeLayout的子空间中 加上: android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_centerInParent="true"
原创
发布博客 2017.03.27 ·
492 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Layout_weight的含义

android:layout_weight的真实含义是:一旦View设置了该属性(仅在LinearLayout中有效),那么该 View的宽度等于原有宽度(android:layout_width)加上剩余空间的占比。Google官方推荐,当使用weight属性时,将width设为0dip即可,效果跟设成wrap_content是一样的。这样weight就可以理解为占比了!
原创
发布博客 2017.03.20 ·
555 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

catalan数

卡塔兰数的一般公式为 C(n,2n)/(n+1)。性质:令h(0)=1,h(1)=1,卡塔兰数数满足递归式:h(n)= h(0)*h(n-1) + h(1)*h(n-2) + ... + h(n-1)h(0) (其中n>=2),这是n阶递推关系;还可以化简为1阶递推关系: 如h(n)=(4n-2)/(n+1)*h(n-1)(n>1) h(0)=1该递推关系的解为:h(n)=C(2n
原创
发布博客 2016.04.15 ·
406 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

dijkstra算法--求两点之的最短路径

# include # define MAX 20int creat_cost(int cost[][MAX]) //cost 用来表示图的邻接矩阵 { int arcnum,vexnum,v1,v2,w; printf ("请输入顶点个数和弧数
"); //输入图的顶点数和弧数 scanf ("%d %d",&vexnum,&arcnum); for (int i=1;
原创
发布博客 2016.04.13 ·
961 阅读 ·
1 点赞 ·
0 评论 ·
1 收藏

BFS--点到点间的最短路径

# include # include # include # define MAX 20 //最大顶点数 typedef struct ARCNODE{ int num; //该边所指的顶点的位置 struct ARCNODE * next; //指向下一条边的指针 }arcnode; //表的结点 typedef struct Vnode{ char d
原创
发布博客 2016.04.12 ·
1185 阅读 ·
0 点赞 ·
0 评论 ·
4 收藏
加载更多