窗体设计: 代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsAppl
dialog是依附于activity存在的.但是app中经常需要使用以下的情况,在service中做一些后台操作,在某个临界条件满足时,显示一个dialog告知用户.这时dialog无法直接从service中启动起来,会报出android.view.WindowManager$BadTokenException:Unable to add window的错误 参考service中显示一个dialoghttp://blog.csdn.net/huxueyan521/article/details/