How do I change text under apps icon for deployed app?

awerberawerber Member ✭✭

The name of my Visual Studio solution is TestXamarinFormsProject, and so was the name of the Android project. After deploying my app to my phone, I see then name of the solution under the icon. I've changed this string in a lot of places, but nothing seems to change the name under the icon. How do I change the name under the icon?

Thanks for any help.

Best Answer

  • awerberawerber ✭✭
    Accepted Answer

    Joe, I apologize for not understanding that I needed to make both the changes you had in your reply on 11/8. When I added the change in the MainActivity.cs file, I got the name I wanted.

    I don't know how, or if, there's a way to assign that answer as the accepted answer. If there is, I will do that.

    Thank you again.

Answers

  • JoeMankeJoeManke USMember ✭✭✭✭✭
    edited November 8

    It comes from the Label property of your Activity attribute, or from the Label property of your Application (probably only defined in the AndroidManifest.xml file).

    // MainActivity.cs
    [Activity( /* HERE */ Label = "TestXamarinFormsProject", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, Theme= "@style/AppTheme")]
    public class MainActivity : FormsAppCompatActivity
    
    <!-- AndroidManifest.xml -->
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="TestXamarinFormsProject.Droid" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
        <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
        <application android:label="TestXamarinFormsProject"> <!-- OR HERE -->
        </application>
    </manifest>
    
  • awerberawerber Member ✭✭

    Thanks for the answer. But I may not test until I get around the error I keep getting. I asked a question here, but I have not seen it posted.

  • awerberawerber Member ✭✭

    The suggestion changed the name in a lot of places, but not on the screen that I open after tapping Apps and bring up the screen with the icon.

  • JohnHardmanJohnHardman GBUniversity mod

    @awerber said:
    The suggestion changed the name in a lot of places, but not on the screen that I open after tapping Apps and bring up the screen with the icon.

    Android caches things. Sometimes it's necessary to do an uninstall of your app before reinstalling it again to get cached information to update. Even that doesn't always work. You might need to even re-start the device between the uninstall and reinstall. It's really annoying, but thankfully we don't change labels and icons very often.

  • awerberawerber Member ✭✭

    I still see the name of the project under the icon. I do see the name I want when I open Settings and look at the list of installed apps.

  • awerberawerber Member ✭✭
    Accepted Answer

    Joe, I apologize for not understanding that I needed to make both the changes you had in your reply on 11/8. When I added the change in the MainActivity.cs file, I got the name I wanted.

    I don't know how, or if, there's a way to assign that answer as the accepted answer. If there is, I will do that.

    Thank you again.

Sign In or Register to comment.