上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: xml文件:assets/person.xml jack 12345 tom 45733 helen 123s432 View Codeperson类:package c... 阅读全文
posted @ 2015-09-27 14:49 pepelu 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 用到的开源项目:https://github.com/google/gson news类:   把对象转换成json: json内容:就是字符串 {"content":"主体","desc":"副标题","title":"标题","id":1000} json转成对象:   list集合==>jso 阅读全文
posted @ 2015-09-27 13:44 pepelu 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 使用SharedPreferences向文件中写入数据:无需权限// 通过SharedPreferences获取editor向data.xml中写入数据 SharedPreferences.Editor editor = getSharedPreferences("data.x... 阅读全文
posted @ 2015-09-25 13:03 pepelu 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 1.外存txt文件的读写2.外存图片文件的读写需要权限:public class MainActivity extends Activity implements OnClickListener { private Button fileSave; private Button file... 阅读全文
posted @ 2015-09-24 20:33 pepelu 阅读(320) 评论(0) 推荐(0) 编辑
摘要: android内存文件读写:无需权限public class MainActivity extends Activity implements OnClickListener { private Button fileSave; private Button fileRead; @... 阅读全文
posted @ 2015-09-24 19:47 pepelu 阅读(691) 评论(0) 推荐(0) 编辑
摘要: 介绍两种SearchView的使用方式:1.在ActionBar上使用SearchView 2.在布局页面上使用SearchView#在ActionBar上使用SearchView1.在ActionBar的配置文件: 2.重写onCreateOptionsMenu():@Override ... 阅读全文
posted @ 2015-09-24 16:52 pepelu 阅读(704) 评论(0) 推荐(0) 编辑
摘要: PendingIntent intent5 = PendingIntent.getActivity(this, LATESTNEWSNOTIFICATIONID, new Intent(                    this, NotificationActivity.class), Pe 阅读全文
posted @ 2015-09-22 18:59 pepelu 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 1.String数组资源文件cities.xml: 丰台区 石景山区 海淀区 漳州市 朝阳区 2.Activity类:public cl... 阅读全文
posted @ 2015-09-22 18:56 pepelu 阅读(678) 评论(0) 推荐(0) 编辑
摘要: 1.主布局文件activity_popup_window.xml: 2.弹出窗口的布局文件view_popup_window.xml: 3.Activity代码:public class PopupWindowActivity ex... 阅读全文
posted @ 2015-09-22 18:07 pepelu 阅读(226) 评论(1) 推荐(0) 编辑
摘要: 库文件:github:https://github.com/jfeinstein10/SlidingMenu1.加载库文件:把项目的libray文件import进项目中右击工程->properties->Android->在library中选add2.主界面activity_sliding_menu... 阅读全文
posted @ 2015-09-22 13:03 pepelu 阅读(173) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页