2

I'm trying to change typeface in an Android app. Everything works well except the MenuItems in OptionsMenu. Thanks to this link (How to set custom typeface to items in NavigationView?) I've modified my options menu fonts, but this solution only works for MenuItems which are "hidden" under the 3 dots

Image of the problem:

To clarify I'm using this bit

private void applyFontToMenuItem(MenuItem mi) {
        SpannableString mNewTitle = new SpannableString(mi.getTitle());
        mNewTitle.setSpan(new CustomTypefaceSpan("" , Font.LightExtended), 0 , mNewTitle.length(),  Spannable.SPAN_INCLUSIVE_INCLUSIVE);
        mi.setTitle(mNewTitle);
}
2
  • did you resolve this problem?
    – hooloovoo
    May 4, 2017 at 13:55
  • probably no, sadly I can't remember May 16, 2018 at 14:35

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.