当我从Google Play安装我的应用时,它在我的主屏幕上显示,它的“标签”是@string/slogan
的值,但在应用菜单中,它是@string/app_name
的值。
minSdkVersion
是14。
我的宣言:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dabestappsever.bigtext"
android:installLocation="auto">
<application
android:allowBackup="true"
android:theme="@android:style/Theme.Holo.Light.DarkActionBar"
android:icon="@drawable/logo">
<activity android:name="com.dabestappsever.bigtext.MainActivity"
android:label="@string/slogan">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.dabestappsever.bigtext.Result"
android:theme="@android:style/Theme.Holo.Light.NoActionBar">
</activity>
</application>
</manifest>
我不确定为什么......
现在,我正在使用Ferran Negre's解决方案,但我想知道是否有办法在没有Java的情况下解决这个问题。
答案 0 :(得分:0)
在AndroidManifest.xml的<applcation>
标记中,您必须添加
<application
android:label="@string/slogan" >
@string/slogan
指向String资源文件夹中的应用程序名称。这将显示在主屏幕上。
答案 1 :(得分:0)
您应该删除意图过滤器上的label
,这就是您现在在启动器屏幕中显示为标签的内容
<intent-filter android:label="@string/app_name">
并在AndroidManifest.xml中的<application>
标记中提供一个。
<application
android:name="@string/slogan"
android:allowBackup="true"
android:theme="@android:style/Theme.Holo.Light.DarkActionBar"
android:icon="@drawable/logo">
intent filter 中指定的label
将覆盖父组件设置的{{1}}。