답변

1

어쩌면이 도움이 될 것입니다 참조 할 수있는 ID의 일부,이 시도 :

TextView toolbarTextView; 
for (int i = 0; i < yourToolbar.getChildCount(); ++i) { 
    final View toolbarChild = yourToolbar.getChildAt(i); 
    if (toolbarChild instanceof TextView) { 
     toolbarTextView = (TextView) toolbarChild; 
    } 
} 

또는 경우 supportActionBar가 있다면 다음을 시도하십시오.

final ActionBar myActionBar = getSupportActionBar(); 
if (myActionBar != null) { 
    myActionBar.setTitle("This a new text"); 
}