我在我的应用程序(Launcher)中使用android设置,所以我可以设置密码保护,但远非如此,一些选项卡/设备可以用不同的方法访问设置,因此我试图为整个"系统(设备)设置"创建密码保护,我如何做到这一点,有可能吗,从我的搜索中,我发现了这个Android,当其他应用程序启动时检测有人能告诉我它是怎么工作的吗
它说,这将不适用于果冻豆和以上。READ_LOGS权限现在只保留给系统应用程序,JellyBean有办法吗。
如果评论中提出的解决方案对您来说还可以,我在这里找到了:
AlertDialog.Builder alert = new AlertDialog.Builder(MyFeedActivity.this);
LayoutInflater inflater=MyFeedActivity.this.getLayoutInflater();
//this is what I did to added the layout to the alert dialog
View layout=inflater.inflate(R.layout.dialog,null);
alert.setView(layout);
final EditText usernameInput=(EditText)layout.findViewById(R.id.dialogusername);
final EditText passwordInput=(EditText)layout.findViewById(R.id.dialogpassword);
我希望它能满足你的需要。