如何命名的Andr​​oid应用 [英] How to name Android Application

查看:145
本文介绍了如何命名的Andr​​oid应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序有2个活动。我在下面的 AndroidManifest

I have an Android App with 2 activities. I have the following in the AndroidManifest:

<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">
    <activity android:name=".MyCellTracker" android:label="@string/activity1_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
 <activity android:name=".DisplaySuccess" android:label="@string/activity2_name"></activity>

活动都是正确的,但是应用程序使用项目名称,而不是安卓标签(@字符串/ APP_NAME)我已经给了它。如果我去要删除的应用程序,然后我看到它使用了机器人命名为:标签。这是为什么不使用 Android的图标下显示在程序启动的名字:在应用节点的标签

The activities are properly named, yet the application is using the project name rather than the android:label (@string/app_name) I have given it. If I go to delete the application, then I see that it is named using the android:label. Why is the name that is displayed under the icon on the program launcher not using android:label in the application node?

推荐答案

这可能不是你要找的答案,但可以使用的setTitle(字符串名称)设置活动称号。

This may not be the answer you're looking for, but you can set the activity title using setTitle(string title).

设置标题以编程方式,以及使用的主要活动的标签设置在清单中的应用程序标题。

Set the title programmatically, and set the app title in the manifest using the main activity's label.

这篇关于如何命名的Andr​​oid应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆