摘要: 无意间看到@sdliuxiaofei的帖子http://www.eoeandroid.com/forum.php?mod=viewthread&tid=166200由于前段时间做相机应用 自己写的相机 结果是各种机型不兼容(没有camera360的技术和时间),搞的头疼看到楼主的帖子才知道这才是"王道",简单又实用.不过@sdliuxiaofei的例子还是有点小问题的,这个例子一般拍下来的是相片的缩略图,压缩到内存卡不到20k的(中兴V880测试是10k.可到省流量.)这样的效果是不能让用户满意的调查了腾讯的相机后发现了他们的都是很好质量的照片,还支持压缩功能,具体 阅读全文
posted @ 2012-05-06 14:35 sfshine 阅读(347) 评论(0) 推荐(0) 编辑
摘要: package com.zte; import java.io.File; import java.io.FileOutputStream; import android.R.integer; import android.app.Activity; import android.content.ContentResolver; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import.. 阅读全文
posted @ 2012-05-05 22:58 sfshine 阅读(515) 评论(0) 推荐(0) 编辑
摘要: package com.su.keylight; /** * defy定时键盘灯工具 * @author sfshine * @blog blog.csdn.net/sfshine */ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Calendar; import android.app.Activity; import ... 阅读全文
posted @ 2012-05-02 18:44 sfshine 阅读(166) 评论(0) 推荐(0) 编辑
摘要: http://book.51cto.com/art/201006/207068.htm8.3.5 全局定时器AlarmManager(3)本例使用BroadcastReceiver来处理定时提醒任务。BroadcastReceiver类的代码如下:packagenet.blogjava.mobile; importjava.util.Calendar; importandroid.app.Activity; importandroid.content.BroadcastReceiver; importandroid.content.Context; importandroid.content. 阅读全文
posted @ 2012-05-02 18:40 sfshine 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 在TextView中使用超级连接有几种方式:1.在属性中设置:<TextView android:id="@+id/testweb" android:layout_width="fill_parent" android:layout_height="wrap_content" android:autoLink="web" //是将文本的web网址解释成超链接 android:text="@string/link_text_auto" />autoLink:一共有几种值:web,pho 阅读全文
posted @ 2012-04-29 11:17 sfshine 阅读(2428) 评论(0) 推荐(0) 编辑
摘要: 另外网址:http://www.darshancomputing.com/android/1.5-drawables.htmlAndroid™ 2.1 android.R.drawable Icon ResourcesAndroid™ 1.5 android.R.drawable Icon ResourcesAndroid™ 1.6 android.R.drawable Icon ResourcesAndroid™ 2.1 android.R.drawable Icon ResourcesOriginated from:http://www.darshancomputing.com/andro 阅读全文
posted @ 2012-04-29 09:45 sfshine 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Layout对于迅速的搭建界面和提高界面在不同分辨率的屏幕上的适应性具有很大的作用。这里简要介绍Android的Layout和研究一下它的实现。Android有Layout:FrameLayout,LinearLayout,TableLayout,RelativeLayout,AbsoluteLayout。放入Layout中进行排布的View的XML属性:1.几种Layout中Item所共有的XML属性:(1)layout_width(2)layout_height注:(1)和(2)用来确定放入Layout中的View的宽度和高度:它们的可能取值为fill_parent,wrap_conten 阅读全文
posted @ 2012-04-27 19:56 sfshine 阅读(185) 评论(0) 推荐(0) 编辑
摘要: public static String getAllFiles(File path) { File files[] = path.listFiles(); if (files != null) for (File f : files) { if (f.isDirectory()) { getAllFiles(f); } else { if (f.getName().indexOf(".lrc") > 0) allLrc += f.getName() + "\n"; } } return allLrc; } 阅读全文
posted @ 2012-04-24 22:30 sfshine 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 2010.11.16———android Camera 拍照的两个问题1、setParameters failed 异常信息如下Java代码11-1611:21:33.902:WARN/System.err(27218):java.lang.RuntimeException:setParametersfailed11-1611:21:33.902:WARN/System.err(27218):atandroid.hardware.Camera.native_setParameters(NativeMethod)......原因在于Java代码parameters.setPreviewSize( 阅读全文
posted @ 2012-04-24 20:33 sfshine 阅读(1652) 评论(0) 推荐(1) 编辑
摘要: //String转double String x = "154.5"; String y = "123.4"; double dx = Double.parseDouble(x); double dy = Double.parseDouble(y);//String转换为double //String转int String x = "15"; String y = "12"; int dx = Integer.parseInt(x); int dy = Integer.valueOf(y).intValue(); 阅读全文
posted @ 2012-04-22 11:35 sfshine 阅读(132) 评论(0) 推荐(0) 编辑