android--如何修改progressDialog内文字字体大小

//先得到Dialog的整个view

View v=dialog.getWindow().getDecorView();

//调用私有方法

setDialogText(v);


//遍历整个View中的textview,然后设置其字体大小

private void setDialogText(View v){
if(v instanceof ViewGroup){
ViewGroup parent=(ViewGroup)v;
int count=parent.getChildCount();
for(int i=0;i<count;i++){
View child=parent.getChildAt(i);
setDialogText(child);
}
}else if(v instanceof TextView){
((TextView)v).setTextSize(40);
}
}


你可能感兴趣的:(android,字体,ProgressDialog)