Salut,
Dans le fichier AndroidManifest.xml il faut ajouter le filter ci-dessous dans l'activité que tu veux par défaut:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Exemple avec deux activity dans le manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package=".....">
... permission ...
<application
android:name="xxxxxx"
android:testOnly="false"
android:allowBackup="true"
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/AppTheme">
<activity android:name=".MyActivity"
android:launchMode="singleTop"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MySettings"
android:parentActivityName=".MyActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MyActivity"/>
</activity>
</application>
</manifest>
Dev addict
"On n'est pas au resto : ici on ne fait pas dans les plats tout cuits ..."