01 2012 档案

摘要:Thread Runnable建立新线程Handler AsycTask执行异步任务(不一定建立新的线程) 阅读全文
posted @ 2012-01-19 15:01 Atlas's blog 阅读(125) 评论(0) 推荐(0)
摘要:如例中所示,声明了一个局部内部类TimerPrint,这个类中的方法引用了一个局部变量testTxt,必须声明为final!!why?逻辑上:因为该内部类出现在一个方法的内部,但实际编译时,内部类编译为Outer$1TimerPrint.class,这说明,外部类的这个方法和内部类是处于同一级别的。换句话说是两者的生命周期不一样!start被调用后,非final变量也会随之消失,就会出现内部类引用非法!但是作用域范围相关(该内部类的作用域就在该方法体内)。实际做法:java编译器的行为是这样的(前提条件是该变量在内部类中被引用):若定义为final,则java编译器则会在内部类TimerPri 阅读全文
posted @ 2012-01-16 11:12 Atlas's blog 阅读(234) 评论(0) 推荐(0)
摘要:getMydownloadListInfo(); MyDownloadListAdapter ad = (MyDownloadListAdapter) list.getAdapter(); ad.notifyDataSetInvalidated(); // adapter.notifyDataSetChanged(); // adapter = new MyDownloadListAdapter(MyDownloadListInfoActivity.this, downData); // list.setAdapter(adap... 阅读全文
posted @ 2012-01-15 18:39 Atlas's blog 阅读(319) 评论(0) 推荐(0)
摘要:sina拒绝后无任何反应,tencent则会打开它自己的一个页面.所以我无法将其跳转到我自己的应用中处理.但是想到我已经用了webview,我应该可以设置这个包含了webview的activity的生命周期,如果在多长时间内没有返回的话,则作为获取失败的结果进行处理. 就像请求网站超时一样.试试先.REFERENCES:http://blog.csdn.net/favormm/article/details/6339936 阅读全文
posted @ 2012-01-12 12:17 Atlas's blog 阅读(136) 评论(0) 推荐(0)
摘要:String[] selectionArgs = new String[]{weiboFlag};Cursor cursor = db.rawQuery("select * from "+ SqliteHelper.TABLE_NAME[1] + " where " + WeiboUserInfo.FLAG+ "=?", selectionArgs);在参数里面再生成string[]和在外面 生成有什么区别?只有在外面生成了再写到里面才不会错,如果写到参数里面会得到=null我把selectionArgs换成new String[]{ 阅读全文
posted @ 2012-01-11 21:32 Atlas's blog 阅读(138) 评论(0) 推荐(0)
摘要:网上说由于APPKEY AND APPSECRET错误的原因.在我这里也差不多,也是没有通过,是由于我写了sina 和 tencent的接口,将获得的accesstoken and accesssecret存入数据库,取的时候没有注意,将sina的错取成了tencent,所以导致了此错误. 阅读全文
posted @ 2012-01-11 18:10 Atlas's blog 阅读(166) 评论(0) 推荐(0)
摘要:"授权失败,请稍候重试:错误码:308”由于appkey 和 appsecret错误url 中的 改成https,在tencent上下载的demo得改签名方式和http 阅读全文
posted @ 2012-01-09 11:47 Atlas's blog 阅读(629) 评论(0) 推荐(0)
摘要:在用手机连上sina微博的时候出现此错误,在电脑里面也能访问到url,最后发现,我没有开手机,的网络 阅读全文
posted @ 2012-01-08 17:07 Atlas's blog 阅读(166) 评论(0) 推荐(0)
摘要:<activity android:configChanges="orientation|keyboardHidden" android:name=".WeiboActivity" android:screenOrientation="portrait" android:launchMode="singleInstance" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > <i... 阅读全文
posted @ 2012-01-07 23:04 Atlas's blog 阅读(255) 评论(0) 推荐(0)
摘要:margin(left top right bottom)距离 marginLeft只是左距离用dip, 字体sp.跟设备无关性Android的计量单位px,in,mm,pt,dp,dip,sp;使用sp作为文本的单位,其它用dip;px与dip的转换Posted on 2011-04-27 18:15 米其林的微笑 阅读(1782) 评论(2) 编辑 收藏 px:是屏幕的像素点in:英寸mm:毫米pt:磅,1/72 英寸dp:一个基于density的抽象单位,如果一个160dpi的屏幕,1dp=1pxdip:等同于dpsp:同dp相似,但还会根据用户的字体大小偏好来缩放。建议使用sp作为文. 阅读全文
posted @ 2012-01-06 22:07 Atlas's blog 阅读(127) 评论(0) 推荐(0)
摘要:06来自Android应用开发者的月度盈收报告IPv4地址即将告罄 全球加速进入IPv6时代09TOP30+知名移动应用排行榜:国内篇大屠杀:Apple 移动专利军团的远征HTML5跨平台游戏公司Moblyng宣布倒闭 阅读全文
posted @ 2012-01-06 12:34 Atlas's blog 阅读(87) 评论(0) 推荐(0)
摘要:Duplicate modifier for the method isExist in type UploadMusicInfoController在UploadMusicInfoController类中重复修饰isExist方法. 由于isExist方法之前多写了一个权限关键字造成. 阅读全文
posted @ 2012-01-06 11:42 Atlas's blog 阅读(8730) 评论(0) 推荐(0)
摘要:SimpleDateFormat now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Calendar c = Calendar.getInstance(); System.out.println("insertTime--->"+now.format(c.getTime())); SimpleDateFormat now = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");yyyy-mm-dd如果写成小写的"mm"则指 阅读全文
posted @ 2012-01-04 00:19 Atlas's blog 阅读(281) 评论(0) 推荐(0)
摘要:holder.img.setImageBitmap(null); holder.img.setBackgroundResource(0); final Bitmap bitmap = new BitmapUtil().getBitmap("/mnt/sdcard/MMIKU/music/image/" + (String) mData.get(position).get("song_id") + ".jpg"); if (null != bitmap) { holder.img.setImageBitmap(bitmap); }els 阅读全文
posted @ 2012-01-03 23:56 Atlas's blog 阅读(234) 评论(0) 推荐(0)
摘要:Dxtrouble processing "java/nio/CharBuffer.class":Ill-advised or mistaken usage of a core class (java.* or javax.*)when not building a core library.This is often due to inadvertently including a core library filein your application's project, when using an IDE (such asEclipse). If you a 阅读全文
posted @ 2012-01-03 22:41 Atlas's blog 阅读(172) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/chenzheng_java/article/details/6260872android与javascript交互调用Google code android开源项目(三)http://blog.csdn.net/dellheng/article/details/7170176http://www.kuqin.com/mobile/20111208/315882.html界面工具Android界面设计工具droiddraw原型用visio和axure 阅读全文
posted @ 2012-01-02 23:26 Atlas's blog 阅读(122) 评论(0) 推荐(0)
摘要:将图片写入数据库public void testUploadPicture() { String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; String url = "jdbc:sqlserver://192.168.0.108:1433;databasename=music"; String user = "sa"; String password = "mmiku"; try { Class.forName(driver); } catch 阅读全文
posted @ 2012-01-02 15:58 Atlas's blog 阅读(798) 评论(0) 推荐(0)
摘要:SimpleDateFormat simpleDateTimeFormat = new SimpleDateFormat( " yyyy-MM-dd HH:mm:ss " ); Calendar c = Calendar.getInstance(Locale.CHINESE); //getInstance() String nowtime = simpleDateTimeFormat.format(c.getTime()) ; 阅读全文
posted @ 2012-01-02 14:37 Atlas's blog 阅读(144) 评论(0) 推荐(0)
摘要:pDialog = new ProgressDialog(context,0);// pDialog.setMax(100);pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);// 设置ProgressDialog 标题pDialog.setTitle("进度对话框");// 设置ProgressDialog 提示信息pDialog.setMessage("正在下载中...");pDialog.show();由于 这个0引起,去掉即可 阅读全文
posted @ 2012-01-02 10:56 Atlas's blog 阅读(133) 评论(0) 推荐(0)
摘要:最近用一个application连接到多个数据库,在混合使用的时候会报出某个表名无效solution:写sql时加上databasename..tablename可解决 阅读全文
posted @ 2012-01-01 23:05 Atlas's blog 阅读(366) 评论(0) 推荐(0)