Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在为android制作一个离线应用程序。是否可以有两种类型的用户 - 管理员和非管理员?管理员是向应用程序添加数据的人,而非管理员只会查看应用程序中的数据。
如果可能,如果管理员向应用程序添加了新数据,我该如何更新非管理员的数据?
当然,这是可能的。你想添加什么样的数据?
要开始使用两个按钮“管理员”和“用户”在您的第一个视图中,当应用程序启动时显示。
“Admin”启动 AdminActivity 以添加数据。这可以存储在键值对、SQLiteDatabase 中或直接存储到内部存储中 - 取决于您要添加的数据类型。
“用户”启动应用程序的只读透视图,显示管理员添加的数据。