2

I am working on a project where I need to modify the Lock Screen and add my View on it. I was reading the question Lock Screen Widget but this is based on adding widget to the lock screen .

Is it possible if we can add our own view to the Lock Screen like displaying my name on the lock screen as a TextView (below the security container or between the widget view and security container).

It will be very helpful if I can find any documentation or reference, till now I am only trying to understand the code in which they have widget container and security container but not sure how to add my view in it and not sure what all thing I need to consider before adding my view.
Any guidance/suggestion would be highly appreciated!
Working on Android 4.2

4

1 回答 1

4

如果我们可以将我们自己的视图添加到锁定屏幕,例如在锁定屏幕上显示我的名字作为 TextView(在安全容器下方或小部件视图和安全容器之间),是否有可能。

假设您有某种方法可以确定“我的名字”,您可以实现一个应用小部件并指示它应该是用户在 Android 4.2+ 上显示在锁屏上的选项。

您可以在 Android 开发人员文档中阅读更多关于编写应用小部件的信息,尤其是关于编写锁屏小部件的部分。此示例项目实现了一个可以在主屏幕或锁屏上显示的应用小部件。

于 2013-07-18T21:25:12.747 回答