- 博客(498)
- 资源 (25)
- 收藏
- 关注
原创 leetcode--Merge Sorted Array
Given two sorted integer arrays nums1 and nums2, merge nums2 intonums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equal tom + n) to hold addit
2015-06-05 15:23:10 521
原创 leetcode--Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3./** * Definition for sing
2015-06-05 15:09:22 446
原创 leetcode--Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?public class Solution { public
2015-06-05 13:54:11 472
原创 leetcode--Add Binary
Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".public class Solution { public String addBinary(String a, String b) { in
2015-06-05 13:47:35 623
原创 ChrisRenke/DrawerArrowDrawable源码解析
转载请注明出处源码下载地址这次解析的控件DrawerArrowDrawable是一款侧拉抽屉效果的控件,在很多应用上我们都可以看到(例如知乎),控件的github地址为https://github.com/ChrisRenke/DrawerArrowDrawable大家可以先来看一下控件的效果这个控件的作者,也写过一篇文章对控件的制作过程做了说明,其中更多的是涉及箭头的
2015-06-02 21:51:32 3191 1
原创 dmytrodanylyk/circular-progress-button源码解析(二)
源码下载http://download.csdn.net/detail/kangaroo835127729/8755815在上篇文章http://blog.csdn.net/crazy__chen/article/details/46278423中,我主要讲述了circular-progress-button状态切换的动画过程,接下来我们看一个最特殊的状态,就是加载状态,这个状态会显示一个圆环
2015-05-31 01:44:34 2610 6
原创 dmytrodanylyk/circular-progress-button源码解析(一)
dmytrodanylyk/circular-progress-button是github上一个开源的按钮控件,这个是链接https://github.com/dmytrodanylyk/circular-progress-button下面是示例图,应该说作为按钮,设计非常的简洁大方,这篇文章就是来介绍一下这个circular-progress-button的源码,让大家明白这么漂亮的控件
2015-05-30 23:42:19 3656 8
原创 leetcode--Plus One
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.public class Solution {
2015-05-26 15:49:06 1011
原创 leetcode--Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defi
2015-05-26 15:27:15 651
原创 Maxwin-z/XListView-Android(下拉刷新上拉加载)源码解析(二)
转载请注明出处http://blog.csdn.net/crazy__chen/article/details/45956179源文件下载地址http://download.csdn.net/detail/kangaroo835127729/8736887本文主要是贴出xlistview的源代码和一个使用实例,没有过多讲解使用实例,MainActivitypublic class
2015-05-25 21:46:25 2442 4
原创 Maxwin-z/XListView-Android(下拉刷新上拉加载)源码解析(一)
本次解析的内容,是github上一个用于下拉刷新上拉加载的控件xlistview,这个功能相信大家在开发的过程中会经常用到。控件的源码地址是https://github.com/Maxwin-z/XListView-Android在这个控件之前,我看过一些相同功能的控件,挑选后觉得XListView功能比较完善,而且易于理解。在android-open-project里面,有提到一个Dro
2015-05-25 15:28:01 3296 2
原创 chenglei1986/DatePicker源码解析(二)
接上一篇文章chenglei1986/DatePicker源码解析(一),我们继续将剩余的部分讲完,其实剩余的内容,就是利用Numberpicker来组成一个datePicker,代码非常的简单为了实现自定义布局的效果,我们给Datepciker定制了一个layout,大家可以定制自己的layout<LinearLayout xmlns:android="http://schemas.a
2015-05-24 15:16:24 1733 1
原创 chenglei1986/DatePicker源码解析(一)
DatePicker在android其实是有提供的一个控件,相信有不少的人使用过它,但是这个控件的外观我们只能做一些简单的设定(原生的),如果我们有更高需求,希望能自定义我们的datepicker的外观,希望赋予它更多的功能,我们就需要自定义一个datepciker控件。在github上,我发现了一个chenglei1986/DatePicker的项目,可以实现上面的需求。地址是https:/
2015-05-23 21:43:43 2719
原创 Scroller类源码解析及其应用(二)
接上一篇文章的内容,这篇文章主要是Scroller类的应用,在讲具体实例之前,我还有顺便提一个Scroller的问题。就是fling()方法和startScroll()方法的区别,其实确保已经在上篇文章说得很清楚(注释里面)。fling没有设置起点坐标和终点坐标,而是根据滑动的起始速度来计算最后会到达的坐标位置。在了解scroller的使用之前,我们来看一下调用示意图据
2015-05-22 16:45:12 1723 2
原创 Scroller类源码解析及其应用(一)
滑动是我们在自定义控件时候经常遇见的难听,让新手们倍感困惑,这篇文章主要介绍Scroller类的源码,告诉打击这个到底有什么用,怎么使用它来控制滑动。另外,我还会结合一个简单的例子,来看一下这个类的应用。要说明Scroller类,我们往往要从另外两个方法说起,一个是ScrollTo(),一个是ScrollBy()这两个方法我们可以在View的源码看到,我们知道其实每个空间都有滚动条,只是有
2015-05-21 21:57:56 2043 2
原创 leetcode--Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-negative.public class Solution { public String m
2015-05-15 23:09:27 608
原创 leetcode--Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]
2015-05-15 20:59:55 656
原创 leetcode--String to Integer (atoi)
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input case
2015-05-14 22:03:57 586
原创 leetcode--First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and uses constant spa
2015-05-14 21:13:52 520
原创 leetcode--Combination Sum II
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inC where the candidate numbers sums to T.Each number in C may only be used once in the combinatio
2015-05-14 20:19:40 531
原创 leetcode--Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations inC where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited numbe
2015-05-14 20:02:29 514
原创 leetcode--Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as "one 2
2015-05-13 18:30:47 588
原创 leetcode--Sudoku Solver
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one unique solution.A sudoku puzzle.
2015-05-13 17:14:04 598
原创 leetcode--Valid Sudoku
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character'.'.A partially filled s
2015-05-13 00:44:35 572
原创 leetcode--Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.
2015-05-12 21:58:46 566
原创 leetcode--Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If the target is not found in
2015-05-12 21:23:57 525
原创 leetcode--Search in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array return its
2015-05-12 20:20:52 598
原创 leetcode--Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring is "()", which
2015-05-12 00:05:31 580
原创 leetcode--Substring with Concatenation of All Words
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) ins that is a concatenation of each word in words exactly once and w
2015-05-10 20:55:13 583
原创 leetcode--Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible o
2015-05-10 11:06:02 527
原创 leetcode--Implement strStr()
Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.public class Solution { public int strStr(String haystack, String ne
2015-05-09 18:38:14 574
原创 leetcode--Remove Element
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new length.public
2015-05-09 00:56:26 779
原创 leetcode--Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear onlyonce and return the new length.Do not allocate extra space for another array, you must do this in place with
2015-05-08 19:36:37 656
原创 leetcode--Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is.
2015-05-08 17:43:12 543
原创 leetcode--Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. You m
2015-05-08 16:30:48 508
原创 leetcode--Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity./** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode n
2015-05-08 15:49:58 438
原创 leetcode--Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((()))", "(()())", "(())()", "()(())", "()()()"
2015-05-08 11:51:20 471
原创 leetcode--Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Definition for singly-linked list. * public class L
2015-05-08 09:43:17 466
原创 leetcode--Valid Parentheses
Given a string containing just the characters '(', ')','{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all valid b
2015-05-08 00:40:47 522
原创 leetcode--4Sum
Given an array S of n integers, are there elements a,b, c, and d in S such that a + b +c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note:Elements
2015-05-07 21:48:49 498
SuperLoadingProgress
2015-12-12
android粒子爆炸
2015-12-04
粒子爆炸特效
2015-12-04
雷达图(蜘蛛网图)
2015-12-03
制作粒子爆炸特效
2015-12-02
模仿手机QQ红点消除功能
2015-11-18
NineoldAndroids
2015-11-14
ListView的多选模式
2015-11-12
TextView自适应
2015-11-11
通用Adapter
2015-11-07
Volley加载本地图片
2015-11-03
接收广播的最高优先级
2015-10-29
CircleIndicator
2015-08-22
SVGPathView
2015-08-17
EventBus代码
2015-08-11
VerticalScrollView
2015-08-09
PullScrollView
2015-07-30
DrawerArrowDrawable
2015-06-02
CircularProgressButton
2015-05-30
xlistview代码
2015-05-25
datepicker
2015-05-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人