上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页
摘要: 简单记录一下四大组件之一的Service的简单实用。 先是最简单的用法,服务的开关,onBind方法的使用 package com.example.wkp.service; import android.content.ComponentName; import android.content.In 阅读全文
posted @ 2016-09-24 22:22 docyard 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 自定义广播 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.wkp.broadcast"> 阅读全文
posted @ 2016-09-22 01:06 docyard 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 使用广播要定义一个广播接收类,如 1 package com.example.wkp.broadcast; 2 3 import android.content.BroadcastReceiver; 4 import android.content.Context; 5 import android 阅读全文
posted @ 2016-09-21 16:36 docyard 阅读(196) 评论(0) 推荐(0) 编辑
摘要: SwipRefreshLayout下拉刷新控件 <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com 阅读全文
posted @ 2016-08-26 01:52 docyard 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 先演示一下如何在一个activity中放置两个Fragment,先定义两个Fragment <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/a 阅读全文
posted @ 2016-08-25 21:17 docyard 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 先上fragment静态加载的代码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation= 阅读全文
posted @ 2016-08-25 02:41 docyard 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 一、使用ViewPager开发新特性引导界面 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layou 阅读全文
posted @ 2016-08-25 01:22 docyard 阅读(911) 评论(0) 推荐(0) 编辑
摘要: 最近时间实在匆忙,博客的代码基本没有解释。 介绍ExpandableListView <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/andr 阅读全文
posted @ 2016-08-24 21:07 docyard 阅读(168) 评论(0) 推荐(0) 编辑
摘要: GridView控件实现菜单 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="m 阅读全文
posted @ 2016-08-24 15:26 docyard 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Spinner控件 ListView控件 一、Spinner控件 点击Spinner会弹出一个包含所有可选值的dropdown菜单,从该菜单中可以为Spinner选择一个新值。 有两种指定数据源的方式 (1)通过数组资源文件指定 <?xml version="1.0" encoding="utf-8 阅读全文
posted @ 2016-08-23 20:34 docyard 阅读(152) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页