上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页
摘要: 介绍:pad B2C客户端时间:1.5月Android客户端开发人员:自己服务器端开发:张成华要查看全图 自行 下载或新标签页打开也可去http://xiangce.baidu.com/picture/album/list/21e35f8523409630c9b995f76e00be2f8acfbdf9这里看 阅读全文
posted @ 2012-09-18 14:53 sfshine 阅读(162) 评论(0) 推荐(0) 编辑
摘要: package com.su.testinray; import java.util.List; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Bas. 阅读全文
posted @ 2012-09-17 13:54 sfshine 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Adapter的作用就是ListView界面与数据之间的桥梁,当列表里的每一项显示到页面时,都会调用Adapter的getView方法返回一个View。想过没有? 在我们的列表有1000000项时会是什么样的?是不是会占用极大的系统资源?先看看下面的代码:public View getView(int position, View convertView, ViewGroup parent) {View item = mInflater.inflate(R.layout.list_item_icon_text, null);((TextView) item.findViewById(R.id. 阅读全文
posted @ 2012-09-17 13:36 sfshine 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1.用java.util.Calender来实现Calendarcalendar=Calendar.getInstance();calendar.setTime(newDate());System.out.println(calendar.get(Calendar.DAY_OF_MONTH));//今天的日期calendar.set(Calendar.DAY_OF_MONTH,calendar.get(Calendar.DAY_OF_MONTH)+1);//让日期加1System.out.println(calendar.get(Calendar.DATE));//加1之后的日期Top2.用j 阅读全文
posted @ 2012-09-06 16:21 sfshine 阅读(386) 评论(0) 推荐(0) 编辑
摘要: android BitmapFactory的OutOfMemoryError: bitmap size exceeds VM budget解决方案 使用android提供的BitmapFactory解码一张图片时,有时会遇到该错误,即:java.lang.OutOfMemoryError: bitmap size exceeds VM budget。这往往是由于图片过大造成的。要想正常使用,一种方式是分配更少的内存空间来存储,即在载入图片的时候以牺牲图片质量为代价,将图片进行放缩,这也是不少人现在为避免以上的OOM所采用的解决方法。但是,这种方法是得不偿失的,当我们使用图片作为缩略图查看... 阅读全文
posted @ 2012-09-04 13:42 sfshine 阅读(349) 评论(0) 推荐(0) 编辑
摘要: import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class TestDate { public static void main(String[] args) { { if (timeCompare()) { System.out.print("测试之后"); } ; } } /** * */ private static boolean timeCompare() { try {//... 阅读全文
posted @ 2012-09-04 10:33 sfshine 阅读(191) 评论(0) 推荐(0) 编辑
摘要: JAVA字符串转日期或日期转字符串文章中,用的API是SimpleDateFormat,它是属于java.text.SimpleDateFormat,所以请记得import进来!用法:SimpleDateFormat sdf = new SimpleDateFormat( " yyyy-MM-dd HH:mm:ss " );这一行最重要,它确立了转换的格式,yyyy是完整的公元年,MM是月份,dd是日期,至于HH:mm:ss就不需要我再解释了吧!ps:为什么有的格式大写,有的格式小写,那是怕避免混淆,例如MM是月份,mm是分;HH是24小时制,而hh是12小时制1.字符串转 阅读全文
posted @ 2012-09-04 10:07 sfshine 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 如果是显示时变短应该使用 java.text 包下面的类做格式化输出 double f = 9.223372036854784E14; System.out.println(new DecimalFormat("0.000").format(f)); 如果只是想改变精度,我觉得大可不必。 降低精度只是使数据计算变得误差变大,而不会减少内存存储消耗 阅读全文
posted @ 2012-09-03 09:32 sfshine 阅读(238) 评论(0) 推荐(0) 编辑
摘要: package com.aijia.util; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.json.JSONException; import org.json.JSONObject; public class PatternUtil { /** * 验证字符串是否是email * * @param str * @return */ public static boolean isEmail(String str) { Pattern patte... 阅读全文
posted @ 2012-09-03 09:18 sfshine 阅读(705) 评论(0) 推荐(0) 编辑
摘要: package com.inrayfitness.widget; import com.inrayfitness.R; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class Fo... 阅读全文
posted @ 2012-08-30 17:45 sfshine 阅读(232) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页