上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 60 下一页
摘要: 1. 得到存储设备的目录:/SDCARD(一般情况下)SDPATH=Environment.getExternalStorageDirectory()+"/";2. 判断SD卡上的文件夹是否存在:通过File对象的exists()方法。 /** * 判断文件是否已经存在; * / public boolean checkFileExists(String filepath) { File file=new File(SDPATH+filepath); return file.exists(); }3.在SD卡上创建目录:通过File对象的mkdir()方法实现。 /* * 阅读全文
posted @ 2013-12-31 15:24 西北野狼 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 如果在导入一个项目到ECLIPSE里时,不要把项目文件放到workspace里面,放到别处再导,否则可能会提示这个错误:AndroidManifest.xml file missing,顺便导入的方式是:File -> New Android Project再选:Create project from existing source.转自:http://blog.csdn.net/etjnety/article/details/7898794 阅读全文
posted @ 2013-12-25 22:03 西北野狼 阅读(513) 评论(0) 推荐(0) 编辑
摘要: 在开发Android项目的时候,有时需要引用多个项目作为library。在引用项目的时候,有时会出现“Jar mismatch! Fix your dependencies”错误。这是因为两个项目的jar包(android-support-v4.jar)不一致。 解决方法是把2个jar都删除,然后各自加上最新的jar包。这样2个jar 包就一致了。 阅读全文
posted @ 2013-12-25 21:45 西北野狼 阅读(169) 评论(0) 推荐(0) 编辑
摘要: import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;public class TestTime {public static void main(String[] args) {String time = "2010年12月08日11时17分00秒";System.out.println(time);// 字符串=======>时间戳String re_str = getTime(time);System.out.println(re_str); 阅读全文
posted @ 2013-12-25 16:09 西北野狼 阅读(339) 评论(0) 推荐(0) 编辑
摘要: DDMS 的全称是Dalvik Debug Monitor Service,它为我们提供例如:为测试设备截屏,针对特定的进程查看正在运行的线程以及堆信息、Logcat、广播状态信息、模拟电话呼叫、接收SMS、虚拟地理坐标等等。打开heap:菜单 Window => Preferences => General => 右边,把 Show Heap Status 打上勾就会在右下角任务栏显示内存监视器,并且可以点击内存回收。用 Heap监测应用进程使用内存情况的步骤如下: 1. 启动eclipse后,切换到DDMS透视图,并确认Devices视图、Heap视图都是打开的;2. 将 阅读全文
posted @ 2013-12-23 23:20 西北野狼 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 转自http://www.418log.org/post-32.html1)进入shell在桌面点开始--运行 输入cmd 点确定 或打开 cmd.exe 进入sdk tools目录如:1C:\Users\Administrator>d:2C:\Users\Administrator>cd D:\Program Files\android-sdk\platform-tools>查看本机已经启动的模拟器1D:\Program Files\android-sdk\platform-tools>adb devices2List of devices attached3emul 阅读全文
posted @ 2013-12-23 22:48 西北野狼 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://www.418log.org/post-89.html.什么是Git 简单地说,Git是 Linux 之父 Linus Trovalds,为管理 Linux 内核代码而建立的,被认为是分布式版本控制工具中的顶级水准。智能、友好、强健、高效。 正如所提供的文档中说的一样,“Git 是一个快速、可扩展的分布式版本控制系统,它具有极为丰富的命令集,对内部系统提供了高级操作和完全访问。”发音:[英][ɡit] [美][ɡɪt] Torvalds 开始着手开发 Git 是为了作为一种过渡方案来替代 BitKeeper,后者之前一直是 Linux 内核开发人员在全球使用的主要源代.. 阅读全文
posted @ 2013-12-23 22:35 西北野狼 阅读(341) 评论(0) 推荐(0) 编辑
摘要: public void getDate(String unixDate) { SimpleDateFormat fm1 = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); SimpleDateFormat fm2 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); long unixLong = 0; String date = ""; try { unixLong = Long.parseLong(unixDate) * 1000; } catch( 阅读全文
posted @ 2013-12-23 18:55 西北野狼 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 1 关于如何在代码里区分条码扫描扫描到是是一维码还二维码关键的三个类,CaptureActivity、DecodeThread、DecodeFormatManager1.首先让我们来看下Zxing的源码,里面有一个DecodeFormatManager编码管理类:该来原本的final类,因为需要用到该类里的一些参数,所以要把它变成普通类,但是不知道这样改变以后对原本的代码结构是否有影响,目前测试的时候没有遇到这个问题。还有就是有几个变量也是常量型的,这里要都要改成static类型的:public static Vector PRODUCT_FORMATS;public static Vecto 阅读全文
posted @ 2013-12-22 08:53 西北野狼 阅读(604) 评论(0) 推荐(0) 编辑
摘要: 首先在模拟器中打开你即将要跳转的系统界面,查看eclipse的logcat,其中包含跳转页面的包名和对应的组件名称,通过类似如下方式实现:Intent intent = new Intent();intent.setClassName("com.android.gallery","com.android.camera.GalleryPicker");startActivity(intent); 阅读全文
posted @ 2013-12-19 23:31 西北野狼 阅读(531) 评论(0) 推荐(0) 编辑
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 60 下一页