如何在Android的警报框中动态添加按钮
问题描述:
我正在开发用于验证的android应用程序,它显示带有警告框的消息.我想根据某些条件动态添加按钮.我喜欢问该怎么做?我在Google上进行了搜索,但找不到任何合适的解决方案.
I am developing android application in which for validations, it displays messages with alert box. I wanted to add buttons dynamically according to certain conditions. I like ask how to do this? I searched on Google, but couldn't find any suitable solutions.
任何建议都是有帮助的. 谢谢.
Any Suggestions are helpful. Thanks.
答
我得到了答案,我在CommandWrapper的帮助下使用了Command Design模式.
i got the answer, I used Command Design pattern with help of CommandWrapper.
以下链接更加详细. 链接
The following link elaborate more precisely. link
感谢大家的建议.