Solved

Android App name cannot display correctly

Posted on 2014-04-18
4
680 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
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.

914 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

20 Experts available now in Live!

Get 1:1 Help Now