Change Android Title Bar Text: Guide

You can modify the text on the Android title bar by following these steps:

  1. Open the values folder inside the res folder, and locate the styles.xml file.
  2. Add the following code to the tags:
<item name="android:windowTitle">你的标题栏文字</item>
  1. Save and close the styles.xml file.

Please note that this method changes the title text of the entire application. If you only want to modify the title text of a specific Activity, you can add the following code in the onCreate() method of that Activity.

getSupportActionBar().setTitle("你的标题栏文字");

This way, you can modify the title text in the specified Activity.

bannerAds