从活动标签中选取的Android应用程序图标名称,而不是从应用程序标签中选取的图标 [英] Android app icon name picked from activity label than from application label

查看:64
本文介绍了从活动标签中选取的Android应用程序图标名称,而不是从应用程序标签中选取的图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不确定是否还有其他人发布了这个问题,尽管有类似的问题,也没有找到任何问题.

Not sure if anyone else posted this question, didn't find any, though there are similar ones.

这是我的清单xml:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
      android:name="com.listCalc.tutorial.simpleinappbillingv3.ui.StartUpActivity"
      android:label="@string/activity_startup_label"
      android:screenOrientation="portrait" >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
    <activity
      android:name="com.listCalc.tutorial.simpleinappbillingv3.ui.MainActivity"
      android:label="@string/activity_main_label"
      android:screenOrientation="portrait" />
    <activity
      android:name="com.listCalc.tutorial.simpleinappbillingv3.ui.PurchasePassportActivity"
      android:label="@string/activity_purchase_label"
      android:screenOrientation="portrait" />
  </application>

String.xml:

String.xml:

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

  <string name="app_name">List Calc in-app billing V3</string>
  <string name="hello_world">Hello world!</string>
  <string name="menu_settings">Settings</string>
  <string name="main_button_purchase_passport_text">Purchase Passport</string>
  <string name="main_cont_desc_image_passport">purchased passport</string>
  <string name="activity_startup_label">Loading</string>
  <string name="activity_main_label">Main Menu</string>
  <string name="activity_purchase_label">Making Purchase</string>

</resources>

应用名称(即启动器图标名称)被选择为"activity_startup_label"而不是"app_name"

The application name i.e. the launcher icon name is being picked up as "activity_startup_label" and not "app_name"

我在做什么错了?

推荐答案

我在做什么错了?

What am I doing wrong?

什么都没有.这是按设计工作.

Nothing. This is working as designed.

根据

为意图过滤器设置的图标和标签用于表示组件,只要该组件呈现给用户以实现过滤器广告的功能即可.例如,具有"android.intent.action.MAIN"和"android.intent.category.LAUNCHER"设置的过滤器将一项活动广告为启动应用程序的活动,即应在应用程序启动器中显示的活动.因此,在过滤器中设置的图标和标签就是在启动器中显示的图标和标签.

The icon and label set for an intent filter are used to represent a component whenever the component is presented to the user as fulfilling the function advertised by the filter. For example, a filter with "android.intent.action.MAIN" and "android.intent.category.LAUNCHER" settings advertises an activity as one that initiates an application — that is, as one that should be displayed in the application launcher. The icon and label set in the filter are therefore the ones displayed in the launcher.

这篇关于从活动标签中选取的Android应用程序图标名称,而不是从应用程序标签中选取的图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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