05 2017 档案

摘要:一:广播的发送 简单几行代码,只需要注意发送需要上下文 public void sendBC(View v){ System.out.println("send bc : "); Intent intent = new Intent(); intent.setAction("com.luo.bc") 阅读全文
posted @ 2017-05-28 18:38 dp_luo 阅读(308) 评论(0) 推荐(0) 编辑
摘要:来自: http://www.cnblogs.com/DreamDrive/p/5430981.html 需要对象实现Serializable接口 public class CloneUtils { // 拷贝一个对象 @SuppressWarnings("unchecked") public st 阅读全文
posted @ 2017-05-21 16:18 dp_luo 阅读(3564) 评论(0) 推荐(0) 编辑
摘要:2017-9-2 1 自定义intentfilter的action的时候要设置catergery为default.不然无法启动 同时exported属性为true 2 自定义字符串的时候默认的values下的string里一定要加,不然编译可能报错 3 SP工具上下文最好不要activity,这样名 阅读全文
posted @ 2017-05-21 16:04 dp_luo 阅读(184) 评论(0) 推荐(0) 编辑
摘要:protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //1找到控件 tv = (TextVie 阅读全文
posted @ 2017-05-21 16:02 dp_luo 阅读(274) 评论(0) 推荐(0) 编辑
摘要:java集合选用指南 阅读全文
posted @ 2017-05-14 10:23 dp_luo 阅读(286) 评论(0) 推荐(0) 编辑
摘要:可以结合Gson对javabean转化成字符串实现对象的存取,基本代码如下 package com.example.luozhenlonghp.project_aidl_demo; import android.content.Context; import android.content.Shar 阅读全文
posted @ 2017-05-13 21:28 dp_luo 阅读(826) 评论(0) 推荐(0) 编辑
摘要:*本demo的server和client写反了 新建工程client,server 在server端新建aidl文件,内容: // IMyAidlInterface.aidl package com.example.server; // Declare any non-default types h 阅读全文
posted @ 2017-05-13 11:30 dp_luo 阅读(609) 评论(0) 推荐(0) 编辑
摘要:步骤: 写一个类继承SQLiteOpenHelper 构造中传入参数 onCreate方法中创建数据库 private StudentDB studentDB; public StudentDBDAO(Context context) { studentDB = new StudentDB(cont 阅读全文
posted @ 2017-05-08 19:37 dp_luo 阅读(681) 评论(0) 推荐(0) 编辑