代码改变世界

[Android学习笔记]try-catch

2014-12-22 14:29 by hellenism, 310 阅读, 0 推荐, 收藏, 编辑
摘要:private boolean test() { boolean result = true; String str = null; try { Log.d("test","出现异常之前"); int length... 阅读全文

[Android学习笔记]查看源代码

2014-11-30 17:18 by hellenism, 170 阅读, 0 推荐, 收藏, 编辑
摘要:http://blog.csdn.net/xiaanming/article/details/9031141 阅读全文

[Android学习笔记]枚举与int的转换

2014-11-30 17:04 by hellenism, 1534 阅读, 0 推荐, 收藏, 编辑
摘要:package com.example.enumdemo; import android.app.Activity; import android.os.Bundle; import android.widget.Toast; public class MainActivity extends Activity { /** * 定义枚举 */ pu... 阅读全文

[Android学习笔记]Fragment使用

2014-11-30 11:19 by hellenism, 230 阅读, 0 推荐, 收藏, 编辑
摘要:一.android.app.Fragment 与 android.support.v4.app.Fragment 区别support.v4.app.Fragment是为了给低版本Android使用的jar包android.app.Fragment支持的最低版本是Android3.0 – androi... 阅读全文

[日记]2014-9-25.

2014-09-26 10:53 by hellenism, 129 阅读, 0 推荐, 收藏, 编辑
摘要:1.使用RelativeLayout设置好关系和Margin之后可以达到适配不同屏幕的需求2.一个ListViewAdatper是可以做多类型适配的,即根据不同类型,创建不同的UI3.UI控件尽量设置Style 阅读全文

[日记]2014-9-24.

2014-09-24 17:38 by hellenism, 127 阅读, 0 推荐, 收藏, 编辑
摘要:Index:1.如何释放Bitmap2.点击空白区域EditText回收键盘http://blog.csdn.net/mad1989/article/details/250698213.使用字体资源时候,如果只有英文字体资源,则在中文设置下最好不要使用该字体,即Code时候做一下简单的判断,只有语言... 阅读全文

[日记]2014-9-23.

2014-09-23 00:23 by hellenism, 149 阅读, 0 推荐, 收藏, 编辑
摘要:Index:1.做过动画的View在setVisibility时无效. 此时需要先调用View.clearAnimation();之后便可setVisibility 阅读全文

[日记]2014-9-21.

2014-09-22 00:02 by hellenism, 164 阅读, 0 推荐, 收藏, 编辑
摘要:Index:1.selector配对按顺序2.常量定义最好加一个前缀3.xml声明的scale动画的的参数含义 阅读全文

[Android学习笔记]Android向下兼

2014-08-03 15:58 by hellenism, 198 阅读, 0 推荐, 收藏, 编辑
摘要:Android向下兼容的思路:使用高版本的API,在运行时判断真实运行平台的API版本,根据不同版本做不同的处理 关键类:Build.class里面定义了API版本相关信息 内部类:VERSION定义当前系统的版本信息,其中包含SDK版本信息Build.VERSION.SDK_INT可以获取到当前运行的系统的SDK版本号 内部类:VERSION_CODES定义了各个版本的枚举信息 适配时: i... 阅读全文

[计算机基础]URI与URL

2014-07-26 14:44 by hellenism, 301 阅读, 0 推荐, 收藏, 编辑
摘要:URI : uniform resource identifier统一资源标示符用于指定Web资源的字符串,它定义了Web资源中的各个不同的部分。ex:http://example.org/absolute/URI/with/absolute/path/to/resource.txtftp://ex... 阅读全文