摘要: Intent简单来说,就是一个传送门,就是把通过Intent,就可以到另外一个地方。关键是Intent还是一扇可以携带东西的传送门,好比是去机场坐飞机,行李也会让从另外一种方式随你到另外一个地方。Intent的日常使用方式如下一般的反射操作String actionName= "com.androidbook.intent.action.ShowBasicView";Intent intent = new Intent(actionName);activity.startActivity(intent);调用浏览器并打开某个网页Intent intent = new Int 阅读全文
posted @ 2014-01-23 16:59 VIJAY-YAN 阅读(157) 评论(0) 推荐(0) 编辑
摘要: ContentProvider是Android四大组件之一,也是一个Android应用与外界交流的媒介之一,通常被称为“数据共享接口”ContentProvider并没有想象中那么难,原理就和JDBC一样,通过和数据存储媒体建立一个桥,然后通过特定的通讯语句去进行数据的增删改查。下面是一个对手机图书SQLite的增删改查第一步:规划数据库,通过写定各种常量去确定SQLite的属性 public static final String AUTHORITY = "com.androidbook.provider.BookProvider"; public static fina 阅读全文
posted @ 2014-01-23 16:50 VIJAY-YAN 阅读(300) 评论(0) 推荐(0) 编辑
摘要: XML文件的读写方式基本上是利用DroidDraw,而且也很少有难的地方,复杂布局尽量用Relative,简单布局用LinearLayout,较为特殊的时候使用FrameLayot,另外两个AbsoluteLayout和TableLayout很少使用。 记录一部分用Java实现的功能】Image //Call getDrawable to get the image Drawable d = getResources().getDrawable(R.drawable.sample_image); //You can use the drawable th... 阅读全文
posted @ 2014-01-23 16:18 VIJAY-YAN 阅读(234) 评论(0) 推荐(0) 编辑