本文实现将原生的launcher 移除,替换成我们自己写的launcher。
分以下几个步骤:
一、新建一个自己的launcher项目。
1.直接使用android studio 新建一个项目。
2.修改AndroidManifest.xml
<application
android:persistent="true"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AngeLauncher"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AngeLauncher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!--launcher相关-->
<category android:name="android.intent.category.HOME" />
<category android