ActivityAlias label not taken from resource

78 Views Asked by At

I have two launcher in my app, one is a normal activity with the intent-filter for launcher/main and the other one is an activityAlias.

For both, I supply labels in the manifest via my strings.xml resources. The reason for this is, that I want to provide different labels in different locales.

Unfortunately only the label of my activity is changed accordingly to the language selected in the android settings.

Why is that?

<activity
    android:name=".MainActivity"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:screenOrientation="portrait"
    android:theme="@style/AppTheme.Transparent">

    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>

</activity>

and the alias

<activity-alias android:name=".MainAlias" 
    android:enabled="true" 
    android:exported="true" 
    android:icon="@drawable/alias_icon" 
    android:label="@string/alias_label" 
    android:targetActivity=".MainActivity">                                             
        <intent-filter> 
            <action android:name="android.intent.action.MAIN"/> 
            <category android:name="android.intent.category.LAUNCHER"/>   
        </intent-filter> 
</activity-alias>
0

There are 0 best solutions below