When I use the default sherlock theme theme, I can change the font face using this method (it can be passed to TextView)
@Override public boolean onCreateOptionsMenu(Menu menu) { getSupportMenuInflater().inflate(R.menu.main, menu); getLayoutInflater().setFactory(new LayoutInflater.Factory() { public View onCreateView(String name, Context context, AttributeSet attrs) { if (name.equalsIgnoreCase("com.android.internal.view.menu.IconMenuItemView") || name.equalsIgnoreCase("TextView")) { try { LayoutInflater li = LayoutInflater.from(context); final View view = li.createView(name, null, attrs); new Handler().post(new Runnable() { public void run() {

but when I use the custom theme this tool , the above solution does not work. Thus, each element is an instance of ActionMenuItemView, and I do not know how to apply a font to it.

moallemi
source share