由于Android系统对硬件的要求较高,并且上层应用都是用Java(效率要比C++低)编写的,对程序的优化就成了程序员的日常工作了;Android的优化
可以从以下几个地方下手:布局优化、数据库优化、使用异步加载数据、使用缓存技术、算法代码优化、使用线程池
先从比较简单的布局入手
程序目录结构
1.使用 标签复用相同部分的布局文件,就是在一個而已文件中包含另一个布局
activi...
分类:
移动开发 时间:
2014-08-20 18:03:02
阅读次数:
330
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ...
分类:
其他好文 时间:
2014-08-20 14:01:22
阅读次数:
210
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:
其他好文 时间:
2014-08-20 13:53:12
阅读次数:
168
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2014-08-20 13:52:32
阅读次数:
142
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t...
分类:
其他好文 时间:
2014-08-20 13:49:52
阅读次数:
225
Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a function ...
分类:
其他好文 时间:
2014-08-20 13:47:32
阅读次数:
224
MySQL常用的存储引擎为MyISAM、InnoDB、MEMORY、MERGE,其中InnoDB提供事务安全表,其他存储引擎都是非事务安全表。MyISAM是MySQL的默认存储引擎。MyISAM不支持事务、也不支持外键,但其访问速度快,对事务完整性没有要求。InnoDB存储引擎提供了具有提交、回滚和...
分类:
数据库 时间:
2014-08-20 02:30:05
阅读次数:
338
Question:You are given two sorted arrays, A and B, where A has a large enough buffer at the end to hold B.Write a method to merge B into A in sorted o...
分类:
其他好文 时间:
2014-08-19 23:51:25
阅读次数:
309
Json.NET6.0 received 4 releases this year,the latest last week. Over these releases, several new features have been added, including several F# specif...
分类:
Web程序 时间:
2014-08-19 22:15:45
阅读次数:
361
可变参数在JDK 1.5添加,刚才知道的。以下来自《Java泛型和集合》一书。将参数打包成一个数组传入方法中是一件让人讨厌的事,在jdk1.5中加入了一个新的功能称为vararg(动态参数),让我们来看看示例class Lists {public static List toList(T… arr....
分类:
编程语言 时间:
2014-08-19 18:17:25
阅读次数:
269