自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 资源 (17)
  • 收藏
  • 关注

原创 适配ListView和RecyclerView构建多Item模板的终极杀器——MTSimpleAdapter

本文中的DEMO和library已上传到github: https://github.com/devilthrone/MTSimpleAdapter 欢迎fork and star O(∩_∩)O需求背景我们在Android开发中经常会遇到下列场景:一个ListView中需要展示多种不同的布局。例如:聊天界面、消息盒子等场景。通常的实现方式是: 重写getViewTypeCount方法返回布局的

2016-04-16 20:49:07 1810 4

原创 Groovy入门(四)——集合Map

Mapmap声明方式def myMap =['a':1,'b':2,'c':3]assert myMap instance HashMapassert myMap.size() == 3assert myMap['a'] == 1def emptyMap = [:]assert emptyMap.size() ==0def map = new TreeMap()map.putAll(my

2016-04-18 21:13:40 9356 1

原创 Groovy入门(三)——集合类型List

Listgroovy中的List结合了Java中数组和List的优势,既可以用下标的形式来访问数组中的元素,而且可以动态扩展数组,相当方便!声明ListList有以下三种声明方式myList =[1,2,3]myList = new ArrayList() 或者 mylinkList = new Linklist(myList);longList = (0..100).toList()Lis

2016-04-18 20:41:58 16978

原创 Groovy入门(二)——集合类型-Range

1. 范围 Rangesranges用..表示范围操作符,用来指定左边界和右边界 ep: (0..10) -> 01234567890..<操作符指定了半排除范围,不包含右边界 ep:(0..<10) -> 0123456789range也可以通过显示方法创建:def a = new IntRange(0,10)Range主要方法range主要有如下方法:1.contains:是否包含

2016-04-18 20:41:03 2528

原创 leetcode 205: Isomorphic Strings

题目描述:Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with another

2016-04-17 19:10:13 467

原创 leetcode 290:Word Pattern

题目描述:Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.Exampl

2016-04-17 16:50:24 429

原创 leetcode 19:Remove Nth Node From End of List

题目描述 Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from

2016-04-16 15:59:20 354

原创 leetcode 235:Lowest Common Ancestor of a Binary Search Tree

题目描述:Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined betwee

2016-04-15 17:44:59 355

原创 leetcode 101:Symmetric Tree

题目描述:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \2 2/ \ / \3 4 4 3But the following is not:

2016-04-15 17:33:14 426

原创 求数组最大子序列的和

题目:给出数组{4,-3,5,-2,-1,2,6,-2},求子序列的最大和。分别用一下两种方法解决。#include <stdio.h>// 方法1: 分治法//时间复杂度 O(NlogN)int max3(int num1 , int num2 , int num3){ int max = num1; if(max<num2)max= num2; if(max<nu

2016-04-03 18:55:21 2900 1

原创 求最大公约数的两种算法

1.辗转相除法辗转相除法是求两个自然数的最大公约数的一种方法,也叫欧几里德算法。 例如,求gcd(319,377): ∵ 377÷319=1(余58) ∴gcd(377,319)=gcd(319,58); ∵ 319÷58=5(余29), ∴ gcd(319,58)=gcd(58,29); ∵ 58÷29=2(余0), ∴ gcd(58,29)= 29; ∴ gcd(319,377)

2016-04-03 18:03:09 10758

绚丽的时间轴

android非常绚丽的时间轴源代码哦! 不可多得哦!

2015-06-10

android 浮动搜索框

android 浮动搜索框 在我们博客http://blog.csdn.net/a253664942/article/details/45728981中有详细的介绍,有问题可以提问

2015-05-15

android人脸识别——HowOld测测你的年龄

android人脸识别——HowOld测测你的年龄 在我的博客http://blog.csdn.net/a253664942/article/details/45723567中有详细的说明,有问题可以留言

2015-05-14

Android自定义控件——闪闪发光的流光字体

Android自定义控件——闪闪发光的流光字体 类似小米的开机动画字体闪亮效果, 代码中有详细的注释 ,如果有不懂的地方可以http://blog.csdn.net/a253664942/article/details/45676493中提问。

2015-05-12

Android自定义动画 3D旋转

Android自定义动画 3D旋转 在http: blog csdn net a253664942 article details 45601973中有详细解释 有问题可以给我留言

2015-05-09

Android仿QQ屏幕抖动

Android仿QQ屏幕抖动源码实例

2015-05-09

Android DialogFragment的使用方法

Android DialogFragment的使用方法 ,google官方推荐使用DialogFragment代替Dialog. 具体的详细解释可以在我的博客http://blog.csdn.net/a253664942/article/details/45585661中看看,有问题的可以我给留言!

2015-05-08

Android ListView分组和字母导航

Android ListView分组和字母导航 类似安卓手机联系人界面

2015-05-08

14天学会安卓快速入门PDF+源码

14天学会安卓快速入门PDF+源码 很不错的文档哦!

2015-05-08

Android 仿京东源码

Android 仿京东APP的源码 有很多不错的功能。可以参考一下!

2015-05-02

Android动画效果 添加购物车抛物线

Android动画效果 添加购物车抛物线 有问题可以到http: blog csdn net a253664942 article details 45157103留言

2015-04-20

Android自定义控件——圆形进度条

Android自定义控件——圆形进度条 代码中有非常详细的注释,如果有问题可以到http://blog.csdn.net/a253664942/article/details/45115407上留言

2015-04-18

Android自定义控件之音量控制器

Android自定义控件之音量控制器 有问题请到http://blog.csdn.net/a253664942/article/details/45017283上留言

2015-04-13

Android自定义控件——音量控制器

Android自定义控件——音量控制器。有问题请在http://blog.csdn.net/a253664942/article/details/45017283留言

2015-04-13

安卓智能de聊天机器人

安卓智能聊天机器人 使用 图灵机器人API接口 QQ聊天布局

2015-03-04

安卓幸运抽奖大转盘

安卓抽奖大转盘 一封装好 可以自己修改图片文字

2015-03-04

安卓智能聊天机器人

安卓智能聊天机器人 使用了图灵机器人的API 仿照QQ的布局

2015-03-04

空空如也

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

TA关注的人

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