у меня есть панель инструментов в моем приложении так:Android - Центр название панели инструментов
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="#263355"
local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
local:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
И я добавить название, как:
getSupportActionBar().setTitle(title);
Я читал, что Android toolbar center title and custom font
Но если я изменяю xml панели инструментов, я не знаю, как изменить значение TextView. Кто-то может мне помочь?
использования, что другой ответ, и использовать findViewById для получить TextView – Knossos
@Knossos Спасибо :) – benjyspider