摘要:
简单记录一下四大组件之一的Service的简单实用。 先是最简单的用法,服务的开关,onBind方法的使用 package com.example.wkp.service; import android.content.ComponentName; import android.content.In 阅读全文
摘要:
自定义广播 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.wkp.broadcast"> 阅读全文
摘要:
使用广播要定义一个广播接收类,如 1 package com.example.wkp.broadcast; 2 3 import android.content.BroadcastReceiver; 4 import android.content.Context; 5 import android 阅读全文
摘要:
SwipRefreshLayout下拉刷新控件 <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com 阅读全文
摘要:
先演示一下如何在一个activity中放置两个Fragment,先定义两个Fragment <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/a 阅读全文
摘要:
先上fragment静态加载的代码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation= 阅读全文
摘要:
一、使用ViewPager开发新特性引导界面 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layou 阅读全文
摘要:
最近时间实在匆忙,博客的代码基本没有解释。 介绍ExpandableListView <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/andr 阅读全文
摘要:
GridView控件实现菜单 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="m 阅读全文
摘要:
Spinner控件 ListView控件 一、Spinner控件 点击Spinner会弹出一个包含所有可选值的dropdown菜单,从该菜单中可以为Spinner选择一个新值。 有两种指定数据源的方式 (1)通过数组资源文件指定 <?xml version="1.0" encoding="utf-8 阅读全文