//先得到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);
}
}