|
|
|
@ -34,6 +34,7 @@ Component(组件)、Extra(扩展信息)、Flag(标志位) -->
|
|
|
|
|
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
|
|
|
|
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
|
|
|
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
|
|
|
|
<!-- 以上为软件所需要的权限,如允许打开网络套接字、创建快捷方式等 -->
|
|
|
|
|
|
|
|
|
|
<application
|
|
|
|
|
android:icon="@drawable/icon_app"
|
|
|
|
@ -46,13 +47,13 @@ Component(组件)、Extra(扩展信息)、Flag(标志位) -->
|
|
|
|
|
android:theme="@style/NoteTheme"
|
|
|
|
|
android:uiOptions="splitActionBarWhenNarrow"
|
|
|
|
|
android:windowSoftInputMode="adjustPan"
|
|
|
|
|
android:exported="true" >
|
|
|
|
|
android:exported="true" > <!-- 当前Activity可以被另一Application组件启动 -->
|
|
|
|
|
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="android.intent.action.MAIN" />
|
|
|
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
|
|
|
<!-- intent-filter接受隐式intent请求(据说显式intent更常见),
|
|
|
|
|
action_main表明程序入口,category_laucher将action设置为在顶级执行(这个词具体指什么?)
|
|
|
|
|
action_main表明程序入口,category_launcher将action设置为最优先执行
|
|
|
|
|
ui.NotesListActivity确实存在一个onCreate函数-->
|
|
|
|
|
</intent-filter>
|
|
|
|
|
</activity>
|
|
|
|
@ -66,32 +67,40 @@ Component(组件)、Extra(扩展信息)、Flag(标志位) -->
|
|
|
|
|
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
|
<!--action_view 显示数据给用户 -->
|
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
|
<data android:mimeType="vnd.android.cursor.item/text_note" />
|
|
|
|
|
<data android:mimeType="vnd.android.cursor.item/call_note" />
|
|
|
|
|
<!-- MIME是一种互联网标准信息类型,其中属性里的内容属于一种自定义MIME,规定了可显示的数据类型 -->
|
|
|
|
|
</intent-filter>
|
|
|
|
|
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="android.intent.action.INSERT_OR_EDIT" />
|
|
|
|
|
<!-- 功能其实就是名称直译过来,插入或编辑一个数据项 -->
|
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
|
<data android:mimeType="vnd.android.cursor.item/text_note" />
|
|
|
|
|
<data android:mimeType="vnd.android.cursor.item/call_note" />
|
|
|
|
|
<!-- 规定了可编辑的数据类型 -->
|
|
|
|
|
</intent-filter>
|
|
|
|
|
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="android.intent.action.SEARCH" />
|
|
|
|
|
<!-- 某种搜索功能 -->
|
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
|
</intent-filter>
|
|
|
|
|
|
|
|
|
|
<meta-data
|
|
|
|
|
android:name="android.app.searchable"
|
|
|
|
|
android:resource="@xml/searchable" />
|
|
|
|
|
<!-- 组件的附加数据项 android.app.searchable是系统api,@xml/searchable具体定义了搜索配置-->
|
|
|
|
|
</activity>
|
|
|
|
|
|
|
|
|
|
<provider
|
|
|
|
|
android:name="net.micode.notes.data.NotesProvider"
|
|
|
|
|
android:authorities="micode_notes"
|
|
|
|
|
android:multiprocess="true" />
|
|
|
|
|
<!-- name:全限定名(包含包名和类名);authorities:
|
|
|
|
|
url提供授权方;multiprocess:多个进程创建多个content provider实例 -->
|
|
|
|
|
|
|
|
|
|
<receiver
|
|
|
|
|
android:name=".widget.NoteWidgetProvider_2x"
|
|
|
|
|