I'm trying to change my applications activity menu bar title. I managed to change font as follows. Anyone help me to change the name of the title. It may be just a one line, but I can't figure it out.
int actionBarTitle = Resources.getSystem().getIdentifier("action_bar_title", "id", "android");
TextView actionBarTitleView = (TextView) getWindow().findViewById(actionBarTitle);
if(actionBarTitleView != null){
actionBarTitleView.setTypeface(typeFace);
}
Try this
getActionBar().setTitle("Your title");
or this if you use appcompat-v7
getSupportActionBar().setTitle("Your title");
You can set the title in action-bar using AndroidManifest.xml. Just add label to the activity. Like
<activity
android:name=".DownloadActivity"
android:label="Your Title"
android:theme="@style/AppTheme" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With