2012年1月5日

ListView 源码学习笔记 [ 原创 ]

摘要: ListView 源码学习笔记public class ListView extends AbsListView { /** * Used to indicate a no preference for a position type. * 指示一个没有被引用的位置 */ static final int NO_POSITION = -1; /** * Normal list that does not indicate choices * 普通列表显示(没有指定显示模式) */ public static final int C... 阅读全文

posted @ 2012-01-05 15:43 Ronald9 阅读(438) 评论(0) 推荐(0) 编辑

Android -- Button [ 学习笔记 一 ] 原创

摘要: 一. 类的继承结构关系图android.widget.Button --- android.widget.CompoundButton --- android.widget.CheckBox --- android.widget.RadioButton --- android.widget.Switch --- android.widget.ToggleButton二. Button 类的使用1) 注册单击事件监听器final Button button = (Button) findViewById(R.id.button_id)... 阅读全文

posted @ 2012-01-05 10:46 Ronald9 阅读(319) 评论(0) 推荐(0) 编辑

2011年12月28日

Android 移动开发一本就够学习笔记一

摘要: 今天向同事借了本 Android 的书, 大概看了下, 书一般吧, 不推荐购买. 免得以为我是在做广告的. 下面把我觉得有用的东西记录下来, 形成笔记, 以备后用.========== 第四章==========1. 获取应用程序 Context可以通过如下方法获取应用程序的 Context:Context context = getApplicationContext();2. 获取应用程序的资源context.getResources() 获取应用程序资源.3. Activity extends Context, 所以有时可以使用它来替代对应用程序 Context 的显示获取, 但是, 不 阅读全文

posted @ 2011-12-28 10:40 Ronald9 阅读(611) 评论(0) 推荐(1) 编辑

在 Eclipse 中导入 Android 示例程序

摘要: 以导入 Android 的 Snake 为例:1. File --> New --> Android Project.2. 在 Contents 中选择 "Create project from existing source".3. 定位到 Snake 目录.4. 工程表单区域中的值将会被自动填入, 这一功能是通过 Manifest 文件实现的. 有时, 还需要指定 Build Target.5. Finish.注意:如果在向工作空间中添加已存的工程时, Eclipse 可能会显示 "Project Snake is missing required 阅读全文

posted @ 2011-12-28 08:54 Ronald9 阅读(355) 评论(0) 推荐(0) 编辑

2011年12月27日

ListActivity 学习[原创]

摘要: 1.public class ListActivity extends Activity;2. ListActivity 中包含下面2个重要的字段: protected ListAdapter mAdapter; --适配器 protected ListView mList; --ListView3. 常用方法 1) protected void onListItemClick(ListView l, View v, int position, long id) This method will be called when an item in the list is ... 阅读全文

posted @ 2011-12-27 11:10 Ronald9 阅读(359) 评论(0) 推荐(0) 编辑

2011年12月26日

APIDemo 学习记录[原创]

摘要: 1. ProgressBar在 Activity 中有如下关于ProgressBar 的方法:1) setProgressBarVisibility 作用:Sets the visibility of the progress bar in the title. 设置标题栏上的水平进度条是否可见.2)setProgressBarIndeterminateVisibility 作用:Sets the visibility of the indeterminate progress bar in the title. 设置标题栏上的圆形(不确定)进度条是否可见.3)setProgressBar.. 阅读全文

posted @ 2011-12-26 11:14 Ronald9 阅读(243) 评论(0) 推荐(0) 编辑

2011年12月25日

加快Android单模块编译

摘要: 加快Android单模块编译转载时请注明出处和作者联系方式文章出处:http://www.limodev.cn/blog作者联系方式:李先静 <xianjimli at hotmail dot com>习惯了automake之后,再用Android的编译系统,就是感觉不爽。编译一个小模块也等上几分钟,有次实在受不了,看了一下它的实现,发现它对任何一次编译都要查找所有的Android.mk:subdir_makefiles=$(shell cat build/tools/Android.mk.cache)我把build/core/main.mk修改了一下,增加了一个cache:sub 阅读全文

posted @ 2011-12-25 18:12 Ronald9 阅读(278) 评论(0) 推荐(0) 编辑

Android中Listview注意事项

摘要: 1. 在ListView的单个Item中,如果包含了其他的widget或者view ,这些view的优先级是高于List Item的单击事件的。为了解决这个问题可以在getView中添加如下代码:layout.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);或者对layout中的每个view进行说明guts.setFocusable(false);rate.setFocusable(false);同时我们也可以强制设置包含的View的Onclick事件不被监听 guts.setClickable(false);2. 通过 阅读全文

posted @ 2011-12-25 17:59 Ronald9 阅读(212) 评论(0) 推荐(0) 编辑

2011年12月21日

Designing for Multiple Screens

摘要: Designing for Multiple Screens多个屏幕的设计Android powers hundreds of device types with several different screen sizes, ranging from small phones to large TV sets. Therefore, it’s important that you design your application to be compatible with all screen sizes so it’s available to as many users as possib 阅读全文

posted @ 2011-12-21 11:12 Ronald9 阅读(169) 评论(0) 推荐(0) 编辑

Orientation to Android Training

摘要: Orientation to Android Training面向 Android 的培训Welcome to Android Training. Here you'll find a collection of classes that aim to help you build great apps for Android, using best practices in a variety of framework topics.欢迎来到 Android 培训课程。 在这里你可以找到一个旨在帮助你能更好地开发 Android 应用程序的课程集合,以及针对每个框架的主题所使用地最佳 阅读全文

posted @ 2011-12-21 10:45 Ronald9 阅读(155) 评论(0) 推荐(0) 编辑

导航