Closed zsemen closed 2 years ago
@dsn5ft I could work on this but what should be the proper way to fix this? MaterialToolbar has 2 hidden methods for grabbing the correct TextView
Most reliable option could be to try to call those hidden methods with reflection and fallback to the current logic if methods are missing, what do you think?
Issue:
The subtitle is aligned to the left if text strings of the title and the subtitle are identical.
Steps: 1) Use MaterialToolbar for toolbar.. 2) Set both titleCentered and subTitleCentered to true 3) Set both tile and subTitle to the same vale, for example "aaa".
Example:
Root cause is in the code line
if (TextUtils.equals(textView.getText(), text))
that results in always returning the TextView of the title and the subTitle is not centered: