2012年10月27日

摘要: http://blog.csdn.net/zcpangzi/article/details/5420805 阅读全文
posted @ 2012-10-27 10:36 南海菜园 阅读(568) 评论(0) 推荐(0)

2012年10月26日

摘要: Intent it = new Intent(context.getApplicationContext(), TestTimer.class); it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);context.startActivity(it); 阅读全文
posted @ 2012-10-26 10:43 南海菜园 阅读(153) 评论(0) 推荐(0)

2012年10月25日

摘要: package com.testmemoryadapter; import java.util.ArrayList; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import ... 阅读全文
posted @ 2012-10-25 02:33 南海菜园 阅读(671) 评论(0) 推荐(0)

2012年10月24日

摘要: public class BitmapCache { static private BitmapCache cache; /** 用于Chche内容的存储 */ private Hashtable<Integer, MySoftRef> hashRefs; /** 垃圾Reference的队列(所引用的对象已经被回收,则将该引用存入队列中) */ private ReferenceQueue<Bitmap> q; /** * 继承SoftReference,使得每一个实例都具有可识别的标识。 */ private class MySo... 阅读全文
posted @ 2012-10-24 14:43 南海菜园 阅读(278) 评论(0) 推荐(0)

2012年10月23日

摘要: 在属性里设置让按钮失去焦点 ··· 将按钮的focusable设置为false ··· 将包含这个按钮的LinearLayout的Descendant focusability设置成blocksDescendants 阅读全文
posted @ 2012-10-23 17:39 南海菜园 阅读(110) 评论(0) 推荐(0)

2012年10月18日

摘要: public static Bitmap loadImageFromUrl(String url, int sc) { URL m; InputStream i = null; BufferedInputStream bis = null; ByteArrayOutputStream out = null; byte isBuffer[] = new byte[1024]; if (url == null) return null; try { m = ... 阅读全文
posted @ 2012-10-18 21:18 南海菜园 阅读(280) 评论(0) 推荐(0)

2012年10月16日

摘要: 第一种方式:public void setListViewHeightBasedOnChildren(ListView listView) { android.widget.ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) { return; } int totalHeight = 0; for (int i = 0; i < listAdapter.getCount(); i++) { Vi... 阅读全文
posted @ 2012-10-16 20:15 南海菜园 阅读(222) 评论(0) 推荐(0)

导航