永发信息网

ProgressDialog android 如何设置字体大小

答案:1  悬赏:10  手机版
解决时间 2021-01-04 16:22
ProgressDialog android 如何设置字体大小
最佳答案
private static final int DLG_SHOW=0;

protected ProgressDialog baseProgressDialog = null;


public Dialog onCreateDialog(int id){
if(id==DLG_SHOW){
this.baseProgressDialog=new ProgressDialog(this);
this.baseProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
this.baseProgressDialog.setIndeterminate(false);
this.baseProgressDialog.setMessage("站点信息读取中...");
this.baseProgressDialog.setCancelable(true);
this.baseProgressDialog.setTitle("斗地主");
//设置ProgressDialog 标题
this.baseProgressDialog.setIcon(R.drawable.icon);
//设置ProgressDialog 标题图标
return this.baseProgressDialog;
}
return super.onCreateDialog(id);
}

protected void onPrepareDialog(int id,Dialog dialog){
//先得到Dialog的整个view
View v=dialog.getWindow().getDecorView();
setDialogText(v);
super.onPrepareDialog(id, dialog);
}

private void setDialogText(View v){
if(v instanceof ViewGroup){
ViewGroup parent=(ViewGroup)v;
int count=parent.getChildCount();
for(int i=0;i View child=parent.getChildAt(i);
setDialogText(child);
}
}else if(v instanceof TextView){
((TextView)v).setTextSize(40);
}
}
最后在你要显示等待框的地方调用
showDialog(DLG_SHOW);
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
下列各项中注音有误的一项是A.睥睨pì 奴
GM回答,GM为什么把FS的一些比较好的地方给改
单选题下列各句中标点符号使用正确的一句是A.
人口最多的少数民族是________.
Mark Twain left school early, make a fortu
单选题小林看到上门维修人员修理电视时用到焊
我的世界矿车会乱跑
It was January thehe came here last time.
单选题下列城市选址类型与肯塔基不同的是A.宜
我两门成绩都合格但是有一门成绩是有效期到20
西南大学网络教育入学机考网络进去不了怎么回
单选题下列哪个反应过程表明氨是由氢、氮两种
请问在什么情况下建筑物应该使用什么结构呢?
(0.35+0.65)÷0.2+0.8=1÷0.2+0.8=5.7.___
每日时辰吉凶
推荐资讯
造梦西游3的代码发一下要全 还有怎么用啊
单选题找出不是比拟的一项A.春风放胆来梳柳,
河南雄狮电商代运营是不是忽悠钱的,有没有人
眼影飞粉怎么办
八所到海口多少公里
1.The clothing shop is on sale?变否定句 2.
单选题下列原子序数所对应的元素组中,两者可
潼湖供电所(潼湖营业厅)办公位置在哪啊?好找
室友说我长得像狐狸,有吗
第二节(共5小题;每小题2分,满分10分)根据
一个喜欢了三年的一个女生主动让你抱让你牵手
泸州龙马潭区网吧
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?