I must change the fonts of my project to external ones and i've done it almost everywhere, now only it's missing the Title's of ProgressDialog and ErrorDialeg (the body is changed too).
So what i do in both cases (comented textview due to Exception):
String msg1 = "one", msg2 = "two";
progressDialog = ProgressDialog.show(activity, msg1, msg2, true);
Typeface font=Typeface.createFromAsset(activity.getAssets(),"fonts/rockwell.ttf");
TextView text = (TextView)progressDialog.findViewById(android.R.id.message);
text.setTypeface(font);
//text = (TextView)progressDialog.findViewById(android.R.id.title);
text.setTypeface(font);
and:
..........
AlertDialog dialog = new AlertDialog.Builder(a)
.setTitle( titol )
.setMessage( cos )
..........
.show();
//Establir el canvi de font a la personalitzada.
Typeface font=Typeface.createFromAsset(a.getAssets(),"fonts/rockwell.ttf");
TextView textView = (TextView)dialog.findViewById(android.R.id.message);
textView.setTypeface(font);
//textView = (TextView)dialog.findViewById(android.R.id.title);
textView.setTypeface(font);
textView = (TextView)dialog.findViewById(android.R.id.button1);
textView.setTypeface(font);
I've tried all options I could (not only 'R.id.title') and I only got Exceptions trying to get the TITLE TextView in both cases. It's the last thing i need to change whole project's fonts. If anyone knows where to get the Title... thanks in advance.