- Activities
一个活动标识一个具有用户界面的单一屏幕public class MainActivity extends Activity { } - Services
服务是运行在后台,执行长时间操作的组件。举个例子,服务可以是用户在使用不同的程序时在后台播放音乐,或者在活动中通过网络获取数据但不阻塞用户交互。public class MyService extends Service { } - Broadcast Receivers
广播接收器简单地响应从其他应用程序或者系统发来的广播消息。举个例子,应用程序可以发起广播来让其他应用程序知道一些数据已经被下载到设备,并且可以供他们使用。因此广播接收器会拦截这些通信并采取适当的行动。public class MyReceiver extends BroadcastReceiver { } - Content Providers
内容提供者组件通过请求从一个应用程序到另一个应用程序提供数据。这些请求由ContentResolver类的方法来处理。这些数据可以是存储在文件系统、数据库或者其他其他地方。
内容提供者是ContentProvider类的子类,并实现一套标准的API,以便其他应用程序来执行事务。public class MyContentProvider extends ContentProvider { }
- 一个界面就是一个 activity
- 生命周期
- How to handle the EditorAction event
EditorInfo
- How to get and set the text for widgets
- How to handle the Click event
- How to set the launcher icon for an app
- the goal of testing is to find errors (bugs) and make an app fail.
- the goal of debugging is to fix all of the bugs that you find during testing
- 邮件地址
- 密码
- 可使用的类型
- windowSoftInputMode attribute
- 组件类型
- high-level
- low-level
- use
- 不继承,创建一个监听器对象【匿名类 anonymous class】
- 匿名内部类【anonymous inner class】
- keyEvent class
- touch events
-
黑马
-
How to supply different themes for different APIs(theme 应用在整个程序或当前界面)
-
How to convert an existing project to the AppCompat theme
- 添加依赖
- 按照下图所示
- heima(styles 应用在控件上)
- How to define a style
- How to create a style sheet
- an EditText widget that uses a TextApperance style
- how to apply themes
- defined
- how to display an options menu
- How to handle option menu events
- How to start a new activity
- PreferenceActivity是一个抽象类,继承于ListActivity,以列表形式视图来展现界面,加载的整个View也是基于ListActivity中那个ListView的,其最主要的优势在于添加Preference后可让其状态持久化储存
- How to define preferences
- 样式属性
- How to display preferences
- How to get preferences
- How to use preferences
- demo
- How to display a fragment in an activity
- How to create a preference fragment
- How to display a preference fragment in an activity
- How to add multiple fragments to a layout
- How to detect screen width
- How to control the soft keyboard
- 知识点
- 实例
- How to download a file from the Internet
- How to parse an XML file
- 黑马
- How to create the layout for a list view
- How to use an adapter to display data in a list view
- How to handle events for an adapter
- How to pass data between activities
- How to dial or call a phone number
- Intent 作用
- Intent 黑马
- 显式意图
- 隐式意图
- 服务的创建(类似于没有界面的activity,在后台长期运行,不需要有界面)
- 服务的生命周期
- 服务的启动方式
startService
bindService
- How to register a service
- How to start and stop a service
- How to test a service
-
简介
-
入门
静态注册,系统自动注册好的
动态注册
-
实例
所以这个号码拨打不出去 -
自定义广播
-
例
-
广播类型
- How to code a receiver for the connectivity changed broadcast



