首页 > 编程知识 正文

alert提示框自动关闭(qdialog去掉关闭按钮)

时间:2023-05-04 19:55:58 阅读:70916 作者:395

alert dialog.buildersetpositivebutton和setNegativeButton单击可自动关闭诊断程序,但文本控件不想关闭这两种方法。 寒冷的蜜蜂p无私的鸡翅inflater=layoutinflater.from (

view view=inflater.inflate (r.layout.dialog _ Chang _ script _ id,null );

alert dialog.builder builder=new alert dialog.builder (mactivity;

builder.settitle (mactivity.getstring (r.string.script _ BTN _ change _ o rider _ id _ titel ) );

builder.setview(view;

final EditText et=(EditText ) view.findviewbyid (r.id.et _ script _ or _ id );

builder.setnegativebutton (mactivity.getstring ) r.string.script_btn_cancel ),null );

builder.setpositivebutton (mactivity.getstring ) r.string.script_btn_yes ),null );

builder.create (;

finalalertdialogdialog=builder.create (;

dialog.show (; dialog.getbutton (alert dialog.button _ positive ).setonclicklistener (newonclicklistener ) ) { @Override

公共语音在线(查看) {

if (textutils.isempty (et.gettext ) ) ) 0

view interface.toast (mactivity.getstring (r.string.script _ o rider _ id _ can _ not _ nu ll ) );

et.seterror (mactivity.getstring (r.string.script _ o rider _ id _ can _ not _ null ) )

}else {

sprefhookutil.putsettingstr (mactivity,sprefhookutil.key _ setting _ order _ id,et.getText ).toString ) )

getisscriptexist(getoriderid (); dialog.dismiss (;

}

}

); )冷蜜蜂p反射冷蜜蜂p

viewdialogview=layoutinflater.inflate (r.layout.dialog _ edit _ text,null );

final EditText et=(EditText ) dialog view.findviewbyid (r.id.et _ dialog _ text ); builder builder=new alert dialog.builder (上下文;

builder.settitle (context.getstring (r.string.liuc un _ dialog _ set _ total _ title ) );

bilder.set view (诊断视图;

builder.setnegativebutton (context.getstring (r.string.liuc un _ dialog _ BTN _ cancel ),null );

builder.setpositivebutton (context.getstring ) r.string.liucun_dialog_btn_ok ),newdialoginterface.onclice

公共语音链接(诊断接口诊断程序,输入交换机)。

logger.I('==count=='count );

if(textutils.isempty(count ) ) )

et.seterror (context.getstring (r.string.liuc un _ tip _ total _ count _ not _ null ) )

view interface.toast (context.getstring (r.string.liuc un _ tip _ total _ count _ not _ null ) ); try {

field field=dialog.getclass (.get super class ) ).getdeclaredfield ) ' mshowing ' );

field.set accessible (真;

field.set (诊断,假);

Logger.I('==字段=='字段);

}catch(exceptione ) {

e .打印堆栈跟踪(;

Logger.I('==field=exception='e );

}

} else {

int integer=integer.parseint (count;

boolean result=sprefhookutil.putsettingint (上下文,sprefhookutil.key _ setting _ run _ times,integer );

if (结果) {

view interface.toast (context.getstring (r.string.liuc un _ tip _ total _ count _ set _ ok ) );

int total count=sprefhookutil.getsettingint (上下文,sprefhookutil.key _ setting _ run _ times,sprefhookutil.d_,

view界面. settotalcounttext (总计数);

} else {

view interface.toast (context.getstring (r.string.liuc un _ tip _ total _ count _ set _ err ) );

}

dialog.dismiss (;

}

}

);

finalalertdialogdialog=builder.create (;

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。