Closed alirezaafkar closed 8 years ago
I can change toolbar title font.
//in activity
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowTitleEnabled(false);
//xml
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="24sp"/>
</android.support.v7.widget.Toolbar>
Can this be closed, since the original issue appears to be resolved?
I had same problem before. now my toolbar title can adjust typekit ( as custom font) you can add
TextView
inside yourtoolbar
View.this is my
toolbar.xml
code.and you need some code in your activity.
you have to override
setTitle()
method. whensetTitle()
is called, you have to setText to yourTextView