【问题标题】:Still no text to app under icon Android StudioAndroid Studio图标下仍然没有文本到应用程序
【发布时间】:2016-01-12 06:35:08
【问题描述】:

如何在安装 pkg 后将文本字符串添加到手机上可见的图标。由 Android Studio 生成的文件,我设法通过将 android:icon= 添加到清单文件中来更改图标,但是如何添加文本,如手机中每个应用程序上始终显示的那样?

这是我的清单文件,手机图标下仍然没有文字!

<?xml version="1.0" encoding="utf-8"?>

<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Include only BLE capable devices.-->
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

<application
    android:icon="@mipmap/my_icon"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">

    <activity
        android:name=".first_activity"
        android:label=""
        android:screenOrientation="portrait"
        android:configChanges="keyboardHidden|orientation|screenSize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name=".second_activity"
        android:label="@string/title_activity_graph_activity"
        android:parentActivityName=".first_activity"
        android:configChanges="orientation|screenSize" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value=".first_activity" />
    </activity>

</application>

【问题讨论】:

  • 不,它与上面的问题不同!请在这个上删除-3!在添加标题之前,问题中没有显示文字但不起作用,还有其他想法吗?

标签: android icons


【解决方案1】:

<application android:label="@string/app_name" ...

更改应用程序标签内的 android:label 的值。通常它采用@string/app_name 的值。所以只需转到res-&gt;values-&gt;strings 并更改“app_name”

【讨论】:

  • 试过没有帮助,是不是有点能见度?也可以设置吗?
  • 那是另一回事,它不会帮助你: android:label :整个应用程序的用户可读标签,以及每个应用程序组件的默认标签。请参阅 元素的各个标签属性。标签应设置为对字符串资源的引用,以便它可以像用户界面中的其他字符串一样本地化。但是,为方便您开发应用程序,也可以将其设置为原始字符串。
  • @Mikael 我自己测试过它确实对我有用。请从您的手机中删除您的应用程序并重新运行。看看有没有帮助。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-05-27
  • 1970-01-01
  • 2016-11-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-15
相关资源
最近更新 更多