Solved

Android App name cannot display correctly

Posted on 2014-04-18
4
676 Views
Last Modified: 2014-04-20
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.
0
Comment
Question by:ron154
  • 2
  • 2
4 Comments
 
LVL 12

Assisted Solution

by:KRUNAL TAILOR
KRUNAL TAILOR earned 50 total points
ID: 40009982
Hi ron154,

Try with removing  android:icon="@drawable/circle" from Activity tag.
Also, Replace android:label="@string/app_name" in Activity tag.

More ref: https://developer.android.com/samples/BasicContactables/AndroidManifest.html

Hth, Let me know this solve your problem or not.

Thanks & Regards,
Krunal T. Tailor
0
 

Author Comment

by:ron154
ID: 40010000
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.
0
 
LVL 12

Accepted Solution

by:
KRUNAL TAILOR earned 50 total points
ID: 40010962
Hi ron154,

Don't remove android:icon="@drawable/circle" and android:label="@string/app_name" from application tag.

It should be something like this,


<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 android:label="@string/blank" android:icon="@drawable/circle">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

Open in new window


Hope this will help you.

Thanks & Regards,
Krunal T. Tailor
0
 

Author Comment

by:ron154
ID: 40011244
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.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

If your app took Google’s lash recently, here are the 5 most likely reasons.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now