上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 60 下一页
摘要: 1.在开始使用TraceView你要注意: 你的设备和模拟器必须设置SD card 和 你的程序拥有对SD card 具有读写操作的权限()2.在你的程序中使用TraceView在activity中的oncreate()中加入Java代码 Debug.startMethodTracing("mytrace");在onpause()加入Java代码 Debug.stopMethodTracing();1// 开始跟踪然后自动保存到 "/sdcard/mytrace.trace" 2Debug.startMethodTracingmytrace") 阅读全文
posted @ 2014-01-13 11:38 西北野狼 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Android性能调优本文主要分享自己在appstore项目中的性能调优点,包括同步改异步、缓存、Layout优化、数据库优化、算法优化、延迟执行等。性能优化专题已完成五部分:性能优化总纲——性能问题及性能调优方式性能优化第三篇——Java(Android)代码优化性能优化第二篇——布局优化性能优化第一篇——数据库性能优化性能优化实例一、性能瓶颈点整个页面主要由6个Page的ViewPager,每个Page为一个GridView,GridView一屏大概显示4*4的item信息(本文最后有附图)。由于网络数据获取较多且随时需要保持页面内app下载进度及状态,所以出现以下性能问题a. ViewP 阅读全文
posted @ 2014-01-11 14:59 西北野狼 阅读(448) 评论(0) 推荐(0) 编辑
摘要: android:gravity="top"设置光标的位置 阅读全文
posted @ 2014-01-08 11:27 西北野狼 阅读(417) 评论(0) 推荐(0) 编辑
摘要: Runnable任务没有返回值,而Callable任务有返回值。并且Callable的call()方法只能通过ExecutorService的submit(Callable task) 方法来执行public class RunnableTestMain { public static void main(String[] args) { ExecutorService pool = Executors.newFixedThreadPool(2); /** * execute(Runnable x) 没有返回值。可以执行任务,... 阅读全文
posted @ 2014-01-07 11:37 西北野狼 阅读(2088) 评论(0) 推荐(0) 编辑
摘要: http://www.360doc.com/content/13/0922/15/9171956_316239845.shtml# 阅读全文
posted @ 2014-01-06 12:19 西北野狼 阅读(139) 评论(0) 推荐(0) 编辑
摘要: /** * @return * * @Title: getDate * @Description: TODO(时间戳转换为String类型的日期数据) * @param @param unixDate 设定文件 * @return void 返回类型 * @throws */ public static String getDate(String unixDate) { String re_StrTime = null; SimpleDateFormat sdf = new... 阅读全文
posted @ 2014-01-04 14:00 西北野狼 阅读(227) 评论(0) 推荐(0) 编辑
摘要: import android.content.Context;import android.net.ConnectivityManager;import android.net.NetworkInfo;import android.widget.Toast;/*** 常用的工具类集合!*/public class Utils { /** * 判断SD卡是否存在! * * @return */ public static boolean checkSD() { return ... 阅读全文
posted @ 2014-01-03 00:22 西北野狼 阅读(273) 评论(0) 推荐(0) 编辑
摘要: import android.content.Context;import android.content.SharedPreferences;import android.content.SharedPreferences.Editor;/*** SharedPreferences的工具类* @author wangfubin*/public class Sp { private static String name = "config"; /** * 获取SharedPreferences实例对象 * * @par... 阅读全文
posted @ 2014-01-03 00:20 西北野狼 阅读(824) 评论(0) 推荐(0) 编辑
摘要: import android.app.Dialog;import android.content.Context;import android.content.DialogInterface;import android.content.DialogInterface.OnKeyListener;import android.view.Gravity;import android.view.KeyEvent;import android.view.View;import android.view.View.OnClickListener;import android.view.Window;i 阅读全文
posted @ 2014-01-03 00:18 西北野狼 阅读(718) 评论(0) 推荐(0) 编辑
摘要: import java.io.File;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.PrintWriter;import java.io.StringWriter;import java.util.Date; import org.apache.commons.lang3.time.DateFormatUtils; import android.os.Environment;import android.util.L. 阅读全文
posted @ 2014-01-03 00:16 西北野狼 阅读(439) 评论(0) 推荐(0) 编辑
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 60 下一页