新建一个android project,选择create project from exsting sample
然后 选择NotePad,打开后可以看到该程序的文件
1.根包名称定义:com.example.android.notepad
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.notepad"
>
2.入口activity
当要求运行android应用程序时,主机会加载该应用程序并读取androidmanifest.xml文件,然后使用其中的intent过滤器查找并启动一个或多少activity,这个intent过滤器具有main操作和launcher类别
NotesList定义了几个intet过滤器,其中定义了一个具有main操作和launcher类别的过滤器,意味着Notelist是属于应用程序启动时运行的活动。
<activity android:name="NotesList" android:label="@string/title_notes_list">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.PICK" />
<cate