Link to home
Start Free TrialLog in
Avatar of ron154
ron154

asked on

Android App name cannot display correctly

Hello experts, I am developing a app using the Eclipse. Today, I found my app name and icon cannot display correctly when I install the app in my Android phone. I have checked my Mainfest file, I thought everything is OK. I need some help thanks.

<application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/MyTheme" 
        >
   
        <activity
            android:name="raiduswaikato.radiusmedical.app.MainActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:icon="@drawable/circle"
            android:label="@string/blank"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

Open in new window


That is application tag in the Mainfest file. Is there anything wrong?

When the app was installed on the phone. The icon was displayed as the android:icon="@drawable/circle" which is the mainactivity title icon. And the app name is blank which is also the mainactivity lable.
Why the application tag does not work?
Thanks.
SOLUTION
Avatar of KRUNAL TAILOR
KRUNAL TAILOR

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ron154
ron154

ASKER

Hi T.Tailor
     When I delete the android:icon="@drawable/circle" and android:label="@string/app_name", the app seems correctly. But the MainActivity's title and icon become to the app's name and icon. That is not I want.
    I need the app shows a name and icon, also the mainactivity shows a name and icon. They are in different. Do you have any solution about that? Thanks for your answer.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ron154

ASKER

Hi Krunal T.Tailor
    I have solved my problem using the activity-alias.
       
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/MyTheme" >
        
        
        <activity
            android:name="raiduswaikato.radiusmedical.app.MainActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        
        <activity-alias
        android:targetActivity="raiduswaikato.radiusmedical.app.MainActivity"
        android:name="raiduswaikato.radiusmedical.app.MainActivity"
        android:label="@string/blank"
        android:icon="@drawable/circle">
          <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
          </intent-filter>
        </activity-alias>

Open in new window


         It seems like that. Anyway, thank you very much.