Center Align Actionbar Title & Use Custom Font As Well
Absolute Android development beginner here, so please bear with me. I am trying to achieve 2 things with my title in the ActionBar: Center align the title text Use a custom font f
Solution 1:
What I would honestly do is forget about the custom TextView
, and just use the default one in the XML. You're using it just this once, and only for the custom font.
You can do something like this instead:
TextViewtv= (TextView) v.findViewById(R.id.title);
Typefacetf= Typeface.createFromFile(getAssets(), "fonts/font.otf");
tv.setTypeface(tf);
tv.setText(this.getTitle());
Post a Comment for "Center Align Actionbar Title & Use Custom Font As Well"