上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 38 下一页
摘要: 造成原因:View.OnClickListener是一个内部匿名类。在内部匿名类中调用外部类元素需要final解决办法:class FollowOnClickListener implements ImageView.OnClickListener { private ImageView iconImageView; private TextView nameTextView; public FollowOnClickListener(ImageView iconIV, TextView nameTV) { ... 阅读全文
posted @ 2012-12-25 12:39 Atlas's blog 阅读(591) 评论(0) 推荐(0) 编辑
摘要: Fastjson:http://code.alibabatech.com/wiki/pages/viewpage.action?pageId=2424946 阅读全文
posted @ 2012-12-20 20:59 Atlas's blog 阅读(294) 评论(0) 推荐(0) 编辑
摘要: AndroidManifest.xml<uses-library android:name="android.test.runner"/><instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.myapp.tests" android:label="MyAppTests" />1.继承androidTestCase类。2.Assert类判断所得到值与期望 阅读全文
posted @ 2012-12-18 09:22 Atlas's blog 阅读(3522) 评论(0) 推荐(0) 编辑
摘要: 众所周知,在跨程序的工程中,统一编码是至关重要的,而目前最普遍的则是统一采用“utf8”编码方案。但是在采用utf8方案的时候,请注意编辑器的自作聪明。比如editplus。原因就在于某些编辑器会往utf8文件中添加utf8标记(editplus称其为签名),它会在文件开始的地方插入三个不可见的字符(0xEF 0xBB 0xBF,即BOM),它的表示的是 Unicode 标记(BOM)。因此要解决这个问题的关键就是把这个标记选项去掉。首先用editplus打开这个文件,从Doucument菜单中选择Permanet Settings,有三个分类,分别是General,File, Tools.点 阅读全文
posted @ 2012-12-14 17:00 Atlas's blog 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 12-12 16:43:16.876: E/AndroidRuntime(7395): FATAL EXCEPTION: main12-12 16:43:16.876: E/AndroidRuntime(7395): java.lang.IndexOutOfBoundsException: Invalid index 10, size is 1012-12 16:43:16.876: E/AndroidRuntime(7395): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)12-12... 阅读全文
posted @ 2012-12-12 17:41 Atlas's blog 阅读(5334) 评论(0) 推荐(1) 编辑
摘要: 首先有人说是MIUI里面做了缓存,我本想让朋友第一次安装一下我更改后的应用,没有得逞。本程序的AndroidManifest.xml 相关配置如下: <application android:name=".MOAApplication" android:icon="@drawable/moa" android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar" > <activity andr 阅读全文
posted @ 2012-12-12 16:18 Atlas's blog 阅读(341) 评论(0) 推荐(0) 编辑
摘要: REFERENCES:http://www.cnblogs.com/ghj1976/archive/2011/04/29/2032495.html建议首先阅读下面两篇文章,这样才可以更好的理解Activity的加载模式:Android的进程,线程模型http://www.cnblogs.com/ghj1976/archive/2011/04/28/2031586.html其中对“Android的单线程模型”的描述,明白Activity的一些注意事项。Android Application Task Activities的关系http://www.cnblogs.com/ghj1976/arch 阅读全文
posted @ 2012-12-10 22:22 Atlas's blog 阅读(200) 评论(0) 推荐(0) 编辑
摘要: REFERENCES:http://blog.csdn.net/zzf112/article/details/7034412注:LinearLayout中的TextView按比例显示的时候,layout_width="0dp"或者layout_height="0dp"在android开发中LinearLayout很常用,LinearLayout的内控件的android:layout_weight在某些场景显得非常重要,比如我们需要按比例显示。android并没用提供table这样的控件,虽然有TableLayout,但是它并非是我们想象中的像html里面 阅读全文
posted @ 2012-12-07 10:59 Atlas's blog 阅读(328) 评论(0) 推荐(0) 编辑
摘要: class MyThread extends Thread{ private SurfaceHolder holder; public boolean isRun ; float radius = 10f; Paint p; public MyThread(SurfaceHolder holder) { this.holder =holder; isRun = true; p = new Paint(); } public ... 阅读全文
posted @ 2012-11-22 10:34 Atlas's blog 阅读(5243) 评论(0) 推荐(0) 编辑
摘要: 问题:使用了thread,asyncTask在其中使用了toast等更新ui解决办法:1.使用handler来发送消息,在主线程中更新ui 2.在报错的方法前加上Looper.prepare(); 末尾加上Looper.loop();REFERENCES:http://sdlqhjk.iteye.com/blog/1112204 阅读全文
posted @ 2012-11-19 16:08 Atlas's blog 阅读(472) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 38 下一页