Android 为什么应用程序名称会在应用程序栏中显示?如何移除它?

Android 为什么应用程序名称会在应用程序栏中显示?如何移除它?,android,android-actionbar,Android,Android Actionbar,我在一个活动中创建了一个空白的应用程序栏,插入了一个文本,一切正常,我稍微修改了代码,现在应用程序栏上显示了应用程序名称,如何删除它,它来自哪里? 这是密码 <android.support.v7.widget.Toolbar android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" and

我在一个活动中创建了一个空白的应用程序栏,插入了一个文本,一切正常,我稍微修改了代码,现在应用程序栏上显示了应用程序名称,如何删除它,它来自哪里?

这是密码

<android.support.v7.widget.Toolbar
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?attr/colorPrimary"
    android:theme="?attr/actionBarTheme"
    android:minHeight="?attr/actionBarSize"
    android:id="@+id/toolbar"
    android:layout_alignParentTop="true"
    android:layout_alignParentStart="true"
    />

要从操作栏中删除标题,请尝试此操作

Toolbar toolbar=(Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setTitle("");
尝试更改操作栏标题

Toolbar toolbar=(Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setTitle("your title");// set your title name

将标签添加到清单中的活动中

<activity
        android:name=".ui.SplashActivity"
        android:label="@string/name_you_want"
        android:clearTaskOnLaunch="true"
        android:excludeFromRecents="true"
        android:screenOrientation="sensor"
        android:theme="@style/Apollo.Landing">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>


refere工作良好且清晰(非常感谢),我可以知道错误是什么吗?我知道,你的答案非常有用,但我还没有接受答案所需的声誉,对不起。@All_\n不需要声誉,只需将我的ans标记为正确。哦,对不起,我还是个新手,我知道了“你的问题已经到了极限,看起来你可能需要休息一下——休息一下,很快回来!”!“,你能告诉我我的问题出了什么问题吗?这样我以后可以问得更好。