如何使用dialog.java? [英] How to use a dialog.java?

查看:76
本文介绍了如何使用dialog.java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的活动中实现pin锁对话框类?

i想在进入mainActivity之前使用dialog.java ...



onStart,onRestart和onResume?再次关闭并运行应用程序,但对话必须是第一个?



它是一个实现的密码保护,允许用户用四位数代码保护应用程序通过使用Dialog ..如何使用我的代码实现它?感谢您的回复!



我的尝试:



i已创建一个onResume,但它没有在清单中声明错误。也许我做错了

How can i implement a pin lock dialog class in my activity?
i want to used a dialog.java before entering mainActivity...

onStart, onRestart and onResume? and closing and running the app again but the dialog must be first?

Its is an passcode protection for implementation, which allows user to protect the app with a four digit code by using Dialog.. How do i implement it with my code? thanks for responses!

What I have tried:

i have created an onResume but it getting an error for not declaring in the manifest. maybe i did wrong

推荐答案

使您的登录活动成为应用程序的主要目的,因此如果登录失败,它将不会加载任何其他活动。在清单中设置 android:clearTaskOnLaunch ,如活动:清除| Android开发者 [ ^ ],以确保所有其他活动不在任务队列中。
Make your login activity the main intent of the application, so it will not load any of the others if the login fails. Set android:clearTaskOnLaunch in your manifest, as described in activity:clear | Android Developers[^], to make sure all the other activities are not held in the task queue.


这篇关于如何使用dialog.java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆